homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: BaseHTTPServer.py fails long POST from IE
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: jafo, juneaftn, pitrou, rhettinger
Priority: normal Keywords:

Created on 2008年02月16日 13:16 by juneaftn, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (4)
msg62455 - (view) Author: June Kim (juneaftn) Date: 2008年02月16日 13:18
http://bugs.python.org/issue430160
http://bugs.python.org/issue427345
These two issues refer to the same bug, which occurs when there is a
POST from an Internet Explorer and the POST's content is long enough.
The issue was resolved by changing the CGIHTTPServer.py to consume the
remaining garbage. However, the bug potentially remains with
BaseHTTPServer.py(and hence its descendants like SimpleHTTPServer, and
3rd party libraries like MoinMoin's stand alone server).
People should have the knowledge of the IE POST bug and put the code
for treating it everytime when they use BaseHTTPServer.
Simple way to solve this is inserting the garbage consuming code in
the "finish" method:
 while select.select([self.rfile], [],[],0)[0]:
 if not self.rfile.read(1): break
msg64107 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2008年03月19日 21:35
Raymond: Can you see the other related issues and see if the proposed
fix (inline in the comment) is acceptable?
msg64403 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008年03月24日 08:46
Unassigning. I don't have more thoughts on this one.
msg171262 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012年09月25日 12:54
Reading the original issue:
"it appears that IE is sending 2 extra bytes ('\r\n') after 
the request data. and if you don't read those two extra 
bytes off, the window's socket handling gets messed up.
the result is that a partial response is returned and the 
socket closed. IE tries to recover by re-POST'ing (which 
is behavior specified in the HTTP/1.1 RFC)... only they 
seem to add an embedded NULL the second time through, and 
the original socket problem happens again anyway."
... I have a hard time believing IE is still broken today. I'd rather close this issue, please re-open if you can reproduce with a recent IE.
History
Date User Action Args
2022年04月11日 14:56:30adminsetgithub: 46379
2012年09月25日 12:54:35pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg171262

resolution: out of date
2010年06月09日 22:10:52terry.reedysetversions: + Python 2.7, - Python 2.5
2008年03月24日 08:46:00rhettingersetassignee: rhettinger ->
messages: + msg64403
2008年03月19日 21:35:04jafosetpriority: normal
assignee: rhettinger
messages: + msg64107
nosy: + jafo
2008年02月16日 13:23:59juneaftnsettitle: BaseHTTPServer.py and long POST from IE -> BaseHTTPServer.py fails long POST from IE
2008年02月16日 13:18:57juneaftnsetmessages: + msg62455
title: BaseHTTPServer.py -> BaseHTTPServer.py and long POST from IE
2008年02月16日 13:16:58juneaftncreate

AltStyle によって変換されたページ (->オリジナル) /