gh-62299: Don't set Content-Length for 1xx, 204 and 304 requests - #12955
berkerpeksag wants to merge 2 commits into
Conversation
vadmium
left a comment
There was a problem hiding this comment.
Hi @berkerpeksag, I wrote some comments on Sunday, but I didn’t have time to finish looking at this. Posting what I got so far in case it’s useful.
There was a problem hiding this comment.
Christian’s original patch made more sense to me, just checking for the first digit being 1, rather than limiting to these three codes. In the HTTP 1.1 RFC https://tools.ietf.org/html/rfc7230#page-31, it says “A server must not send a Content-Length header field in any response with a status code of 1xx (Informational)”.
There was a problem hiding this comment.
Ironically, I decided to list all three codes explicitly after I read that section because I had to Google them :) Both styles fine for me.
|
@vadmium do you have any further comments? I'd like to get this merged this weekend if possible. |

https://bugs.python.org/issue18099