Bugs item #1190580, was opened at 2005-04-26 23:32 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1190580&group_id=5470
Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexander Schremmer (alexanderweb) Assigned to: Nobody/Anonymous (nobody) Summary: SimpleHTTPServer sends wrong c-length and locks up client Initial Comment: On windows, SimpleHTTPServer shows a severe bug: it sends a wrong content-length header. In fact, it sends the wrong data. It differentiates between the mime types "text/" and the remaining ones and decides upon that if it should open the file in binary mode. That is illegal according to the RFCs, any text/ mimetype has to be served using \r\n line endings, therefore it may not read it in non-binary mode. My suggestion: remove the disambiguation (that means the if block). Umm, yeah, my initial reason to report this: if the content-length value is greater than the actual delivered data size, gateways/clients may lock up if they use pipelining. (And they do, BTDT). The reason for that wrong value: the filesize if determined before line end conversion (implicit because of non-binary read file mode) . ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1190580&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com