Haakon Riiser wrote: > [Fredrik Lundh] > >> Haakon Riiser wrote: >> >>> Yes, and it doesn't help. >> then the server is mostly likely broken beyond repair. > > It's not in my power to upgrade the server, unfortunately. > Guess I'll have to use Perl. > >> to see if this really is the problem, you could try moving the call to >> self._send_output() from the end of the endheaders() method to the end >> of the _send_request() method (around line 870 in httplib.py, at least >> in 2.5). > > Tried this, but the tcpdump still looks the same (two packets: one > with the headers, one with the body), and now it fails with > > urllib2.HTTPError: HTTP Error 501: Not Implemented > > Nevertheless, I'm fairly sure that the packet fragmentation is > the culprit. It works perfectly with Perl, even when I make > no effort at all to spoof the browser (no user-agent, referer, > cookies, etc.). > It really does seem quite bizarre that a server should respond differently to the same TCP request when it is split differently into IP datagrams.
There really is nothing wrong (from a standards point of view) with sending FIN with your last data segment. FIN means "I guarantee to send no more data, and will continue to acknowledge your segments until I see your FIN". Are you planning to report this bug to Ipswitch? It certainly sounds like someone should. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list