[issue1346874] httplib simply ignores CONTINUE

2011-04-24 Thread Carl Nobile

Carl Nobile  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 
<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  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  wrote:

>
> André Cruz  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 
> <http://bugs.python.org/issue1346874>
> ___
>

--

___
Python tracker 
<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  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  wrote:

>
> André Cruz  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 
> <http://bugs.python.org/issue1346874>
> ___
>

--

___
Python tracker 
<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  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 wrote:

>
> Senthil Kumaran  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 
> <http://bugs.python.org/issue1346874>
> ___
>

--

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