[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: Thanks for attention -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Okay that makes a lot more sense! I agree that this should either be fixed in httplib2 or in your own script. The problem parallels Issue 5038, where urlopen() is used (rather than httplib2), and the request is retried after getting an authorization failure (ra

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread R. David Murray
R. David Murray added the comment: The issue is definitely in httplib2, then. You should open an issue on their bug tracker. -- resolution: -> third party stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: You right I found who resend requests! My request is goes through httplb2(which use httplib and resends request on failure), but the issue is that if request body contains file and then that file is read out and on retry there is nothing to read since we alre

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: As far as I understand, httplib should not be automatically reconnecting and re-sending requests. I still suspect your script may be causing the retry, but you are welcome to prove me wrong. Can you clarify “send PUT request to closed socket”: is the local OS s

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread R. David Murray
R. David Murray added the comment: This patch is definitely invalid. There is no requirement that data be seekable. Are you saying that there insufficient support in http(lib) for an application to handle this server timeout? Can you provide a program that demonstrates the problem (even bet

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41288/Выделение_061.png ___ Python tracker ___ ___ Python-bugs-list mailin

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41287/Выделение_059.png ___ Python tracker ___ ___ Python-bugs-list mailin

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41286/Выделение_058.png ___ Python tracker ___ ___ Python-bugs-list mailin

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: > Why can’t you do the file rewinding yourself, when you retry the request? Actually I'm not retry to send a request. This behavior I met for httplib library while I'm send a single request, httplib send it to exist connection and then recreates connection on

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Sorry but I have a few concerns about your patch: Why does this have to be in the HTTPConnection.send() method? Why can’t you do the file rewinding yourself, when you retry the request? This could break compatibility if someone wrote code that expects data to b

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-10 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : -- keywords: +patch Added file: http://bugs.python.org/file41284/httplib.patch ___ Python tracker ___ ___

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-10 Thread Mikhail Gulyaev
New submission from Mikhail Gulyaev: Hello guys! Recently I recived some strange behavior for sending http requests using httplib My python script uses httplib and interacts with a web server which have a keep-alive timeout 5 seconds. Script makes PUT requests and sends files to server. At fi