FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-42550: Add 'Expect: 100-Continue' support to httplib by tbartlett0 · Pull Request #14880 · python/cpython · GitHub

/ cpython Public

gh-42550: Add 'Expect: 100-Continue' support to httplib - #14880

Open
tbartlett0 wants to merge 2 commits into
python:mainfrom
tbartlett0:fix-issue-1346874
Open

gh-42550: Add 'Expect: 100-Continue' support to httplib#14880
tbartlett0 wants to merge 2 commits into
python:mainfrom
tbartlett0:fix-issue-1346874

Conversation

tbartlett0 commented Jul 21, 2019
edited by serhiy-storchaka
Loading

Copy link
Copy Markdown

Previously, http.client would always send content body immediately and ignore any 100 responses. This change makes HTTPClient.request() wait for a Continue response if the Expect: 100-Continue header is set, and adds a parameter to HTTPClient.getresponse() that will cause it to return 100 responses instead of eating them.

https://bugs.python.org/issue1346874

Previously, http.client would always send content body immediately and ignore any 100 responses. This change
makes HTTPClient.request() wait for a `Continue` response if the `Expect: 100-Continue` header is set, and
adds a parameter to HTTPClient.getresponse() that will cause it to return 100 responses instead of eating them.

Copy link
Copy Markdown
Author

This PR is intended to be backwards-compatible, but I have identified two potential edge cases:

  • clients that currently set Expect: 100-Continue with a broken server that ignores the header: This will introduce a delay of expect_timeout seconds to each request. However, this can be fixed by a) not sending the header or b) setting expect_timeout to 0.
  • anyone who redefines HTTPClient.response_class: this is likely to be a breaking change, as a new kwarg is used on HTTPResponse.begin(). (This seems like a fairly rare situation, as it's not exposed as an __init__ param, but chances are that someone, somewhere has done it...)

csabella requested review from orsenthil and vadmium February 6, 2020 22:29
csabella requested review from orsenthil and removed request for orsenthil and vadmium June 12, 2020 22:32

quadoss commented Apr 5, 2022

Copy link
Copy Markdown

Is there an update on this one, its been in open state for couple of years and I too have been hitting this and wanting to see when this would be merged

Copy link
Copy Markdown

Just bumping. Is this PR on consideration for getting merged? Or, are there any other plans for #42550 ? I am encountering this problem at work.

python-cla-bot Bot commented Apr 6, 2025
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

IngridMorstrad commented Apr 8, 2025
edited
Loading

Copy link
Copy Markdown

Hi, @tbartlett0
Is this PR still being worked on? Or can someone else (me) take it over?

Copy link
Copy Markdown
Member

Tim would need to (re-)sign the CLA.

Copy link
Copy Markdown
Author

Hi, I haven't touched this since it was submitted, since there seemed to be limited interest and I ended up working around it in other ways. If someone else wants to take it on I have no problem with that (either using my code or rewriting their own, there might be a better way to achieve it)

Copy link
Copy Markdown
Author

@IngridMorstrad
I (re-)signed the CLA, hopefully that clears any issues if you wish to take this on now.

Copy link
Copy Markdown

I don't have permissions here, so created a new PR: #133276

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 7, 2026
serhiy-storchaka changed the title bpo-1346874: Add 'Expect: 100-Continue' support to httplib gh-42550: Add 'Expect: 100-Continue' support to httplib Aug 12, 2026
github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL