[issue1346874] httplib simply ignores CONTINUE

2020-11-04 Thread Mattias Amnefelt


Change by Mattias Amnefelt :


--
nosy: +Mattias Amnefelt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -terry.reedy
versions:  -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Tim B


Tim B  added the comment:

I've created a PR to potentially implement this in 3.9. Please take a look and 
review/test, if this issue is still relevant to you.

--
nosy: +tbartlett0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Tim B


Change by Tim B :


--
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Tim B


Change by Tim B :


--
pull_requests: +14665
pull_request: https://github.com/python/cpython/pull/14880

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2017-09-02 Thread Georg Sauthoff

Changes by Georg Sauthoff :


--
nosy: +gms

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2016-04-03 Thread Patrick J McNerthney

Patrick J McNerthney added the comment:

"(though I don’t understand why Apache doesn’t renegotiate while the request 
body is being sent)"

Apache does attempt to do this, but HttpsConnection is immediately sending the 
body of the request as fast as the socket will allow, which fills up the 
SSLRenegBuffer before the renegotiation can occur.

"Or perhaps a new method that explicitly waits for the 100 response."

That is likely a good idea. My httplib.py fork did change the behavior of the 
endheaders method to return a response object if there was an error returned in 
response to the "Expect: 100-continue".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2016-04-03 Thread Martin Panter

Martin Panter added the comment:

Thankyou, I think I understand your situation better now (though I don’t 
understand why Apache doesn’t renegotiate while the request body is being sent).

I would still argue that this is a new feature to be added rather than a bug 
though, and should only go into Python 3.6+. The original HTTP 1.1 
specification (RFC 2068) did not even mention an “Expect: 100-continue” header 
field, although it does mention the “100 Continue” response. And any change 
will probably need new APIs and documentation.

Rather than parsing the headers for “100-continue”, I wonder if it would be 
cleaner adding an API flag to add the header. Or perhaps a new method that 
explicitly waits for the 100 response.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2016-04-02 Thread Martin Panter

Martin Panter added the comment:

Patrick, can you elaborate on the problem with Apache and renegotiation? How 
does the 100-continue request, or anticipating the 100 response, help? Perhaps 
Issue 25919 is relevant in this case, where we want the client to receive an 
error response before the request data is completely sent.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2016-03-22 Thread Patrick J McNerthney

Patrick J McNerthney added the comment:

I believe this is actually a bug, because it causes the posting of messages 
whose length is greater then the Apache HTTPD SSLRenegBufferSize setting to 
fail, whereas other http clients that first wait to receive the 100 response 
before sending the body do work.

The situation I am encountering is an Apache server that uses client 
certificates to authorize calls to it's rest apis, whereas the rest of the same 
site do not require it. See the documentation about the SSLRegenBufferSize 
here: https://httpd.apache.org/docs/trunk/mod/mod_ssl.html#sslrenegbuffersize

By sending just the headers first with the "Expect: 100-continue" header and 
then waiting for the "100" response, Apache only has to buffer the headers. But 
the way HTTPConnection currently works, the headers and the body will be sent 
immediately, causing the SSLRenegBuffer to be exceed, causing the request to 
fail.

Also, I do not think the submitted patch is the best fix for this. The 
HTTPConnection.putheader method should be the place that checks to see if there 
is an Expect header sent.

--
nosy: +IcicleSpider

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2015-04-15 Thread Martin Panter

Martin Panter added the comment:

This seems more like a new feature than a bug fix to me. Currently the 
behaviour is the same whether “Expect: 100-continue” is requested or not. 
According to https://tools.ietf.org/html/rfc7231#page-35, the client does not 
have to wait any specific length of time for the “100 Continue” response, so 
sending the body straight away is okay.

In current releases (2.7, 3.4), maybe it would be good enough to document that 
the body is always sent without waiting, even if “Expect: 100-continue” is 
requested.

Considering this as a new feature, the new exceptions don’t seem very flexible 
to me. What is the use case, or what would your code look like? If I wanted to 
use the expectation feature of HTTP, I think I would want to know the reason 
why “100 Continue” was not received, and the blanket ContinueExpected exception 
is not going to be very helpful with that. Maybe I am being redirected 
somewhere else first, or maybe I have to log in with some kind of 
authentication, etc, but there is no way to get the relevant Location, 
WWW-Authenticate, etc fields.

Some more comments specifically about issue1346874-273.patch:

* The documentation should say what the behaviour is when “Expect: 
100-continue” is requested. Point out that some sort of response is expected 
from the server before sending the body, and if the server does not send such a 
response the request will deadlock or time out.

* __all__ would need updating with the new exceptions

* “100 Continue” responses should still be read even when the expectation field 
is not in the request (and presumably, second and subsequent “100 Continue” 
responses should also be skipped even when the expectation is enabled). If 
there is not a test for this, one should probably be added.

--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-11 Thread André Cruz

André Cruz an...@cabine.org added the comment:

Attached is an updated patch against 2.7.3. It solves a bug in the tests and 
implements Carl's suggestion. The new tests pass and it updates the 
documentation as well.

As for inclusion in 2.7, as this is in fact solving a bug, I would vote for it. 
Right now, if the client sends an Expect header, httplib will send the body 
of the request along, which is against the RFC. It is backwards-compatible.

--
Added file: http://bugs.python.org/file26357/issue1346874-273.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread André Cruz

André Cruz an...@cabine.org added the comment:

Can anyone confirm what is missing for this patch to be committed?

Is it just test and documentation changes or is something wrong with the code 
changes as well?

--
nosy: +edevil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Carl Nobile

Carl Nobile carl.nob...@gmail.com added the comment:

I was told some time ago that it was documentation changes. And, if I
remember correctly CONTINUE (100) was not ignored, it was actually broken.
Data was being read from stdin when a CONTINUE was received and this should
never happen based on RFC 2616, because there will never be any data to
read.

~Carl

On Tue, Jul 10, 2012 at 12:15 PM, André Cruz rep...@bugs.python.org wrote:


 André Cruz an...@cabine.org added the comment:

 Can anyone confirm what is missing for this patch to be committed?

 Is it just test and documentation changes or is something wrong with the
 code changes as well?

 --
 nosy: +edevil

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue1346874
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread André Cruz

André Cruz an...@cabine.org added the comment:

As far as I can see, the patch does add some documentation changes. What 
exactly is missing?

As for the bug, if I understood correctly, what you are saying is that when 
ignore_continue is True, and the server sends a 100 Continue response, the 
code will continue to try to read data from the server even though none is 
expected, is that right?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Carl Nobile

Carl Nobile carl.nob...@gmail.com added the comment:

Yes, exactly. I was not the one who posted the original bug report, but I
found it when I ran into the same problem. I was not exactly sure if the
original poster had the same issues as I had. I do know that my fix to the
code eliminated some code making the code a bit simpler. I could try to dig
up my fix and send it to you if you want.

~Carl

On Tue, Jul 10, 2012 at 5:32 PM, André Cruz rep...@bugs.python.org wrote:


 André Cruz an...@cabine.org added the comment:

 As far as I can see, the patch does add some documentation changes. What
 exactly is missing?

 As for the bug, if I understood correctly, what you are saying is that
 when ignore_continue is True, and the server sends a 100 Continue
 response, the code will continue to try to read data from the server even
 though none is expected, is that right?

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue1346874
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread André Cruz

André Cruz an...@cabine.org added the comment:

Carl: that would be great. Do you use it regularly? Any other problems?

Python devs: can anyone confirm me what still needs to be done so that this 
patch can be considered for merging into trunk? Thanks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

The patch seems good. I apologize that this has been sitting stale for a long 
time. Since this is a new feature, I am not sure if putting to 3.3 might be a 
good idea. This is a feature for httplib, so it may not make it to 2.7.x, but 
can make it to 3.4.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Carl Nobile

Carl Nobile carl.nob...@gmail.com added the comment:

André,

As I said I'm not sure if I am fixing the same thing that this bug was
originally posted for. However, after looking at my code I realized that I
just did a quick work around for my situation and it shouldn't be put into
any python release.

This issue is that after a client receives a CONTINUE the client needs to
send the balance of the data. My issue is that the client wouldn't always
do that and the server would hang. So there seems to be a bug
with regard to a reasonable timeout.

When I write RESTful web services I often need to implement CONTINUE, but
this status is rarely used, so I guess I don't use it too regularly.

~Carl

On Tue, Jul 10, 2012 at 7:46 PM, Senthil Kumaran rep...@bugs.python.orgwrote:


 Senthil Kumaran sent...@uthcode.com added the comment:

 The patch seems good. I apologize that this has been sitting stale for a
 long time. Since this is a new feature, I am not sure if putting to 3.3
 might be a good idea. This is a feature for httplib, so it may not make it
 to 2.7.x, but can make it to 3.4.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue1346874
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2011-08-06 Thread Nikolaus Rath

Changes by Nikolaus Rath nikol...@rath.org:


--
nosy: +Nikratio

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2011-04-25 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Carl, anyone is free to submit an incomplete patch, and people often do, but if 
people who are affected by an issue do not think it worth their time to 
complete it, or even move it along, there is no reason to expect people who are 
not affected by it to think so either. All of us volunteers are busy doing 
whatever it is we do.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2011-04-24 Thread Carl Nobile

Carl Nobile carl.nob...@gmail.com added the comment:

I have run into this same issue. It does violate RFC2616 in section 4.3 All 
1xx (informational), 204 (no content), and 304 (not modified) responses MUST 
NOT include a message-body. All other responses do include a message-body, 
although it MAY be of zero length.

The embedded while loop is looking for entity data coming back from the server 
which will never be seen. In my tests the code dies with an exception. I don't 
see why anything is being done special for a 100 CONTINUE at all. My fix was to 
eliminate the code previously quoted and replace it with a single line of code 
so that it would now look like the code snippet below.

   def begin(self):
if self.msg is not None:
# we've already started reading the response
return
version, status, reason = self._read_status()
self.status = status
self.reason = reason.strip()

Note on providing a patch as stated previously.

Having this restriction on providing a patch is a large deterrent to people. I 
spent a lot of time myself finding the cause of the issues I was having. I 
don't really have the time to fix tests and documentation also. I understand 
the reason for asking, but it certainly is a discouragement to helping when 
bugs are found.

--
nosy: +Carl.Nobile

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2010-08-22 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee:  - orsenthil
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2010-08-21 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
stage:  - patch review
type:  - behavior
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2008-08-07 Thread Rick Harris

Rick Harris [EMAIL PROTECTED] added the comment:

I'm implemented the behavior described by Mike above with a patch to
2.6. The patch will raise an ExpectationFailed before sending the body
if the server responds with a 417 (Expectation Failed).

This patch should only modify behavior for requests that specify
Expect: 100-continue in the request's headers.

Note: The spec says that the client should send the body if the server
does not respond within some reasonable period of time. This is not
currently supported. Anyone have any thoughts on how that could be done?

--
keywords: +patch
nosy: +rharris
versions: +Python 2.6 -Python 2.4
Added file: http://bugs.python.org/file11073/issue1346874.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1346874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com