[ python-Bugs-812340 ] BasHTTPServer IE Mac 5.1 size problem
SourceForge.net
noreply at sourceforge.net
Tue Nov 9 01:35:10 CET 2004
Bugs item #812340, was opened at 2003-09-25 06:24
Message generated for change (Comment added) made by facundobatista
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=812340&group_id=5470
Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Sven Passig (coderscom)
Assigned to: Nobody/Anonymous (nobody)
Summary: BasHTTPServer IE Mac 5.1 size problem
Initial Comment:
I run a BaseHTTPServer that way:
import CGIHTTPServer
import BaseHTTPServer
Handler = CGIHTTPServer.CGIHTTPRequestHandler
PORT = 8080
httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler)
print "Serving at port ", PORT
httpd.serve_forever()
on a linux, windows or OSX System, doasn't matter for
the problem
When i try to get a a big html-side (static html or cgi,
doasn't matter) with InternetExplorer 5.1 on OSX or OS9
the server hangs itself up.
I try to figure out the reason. It deppends on the size:
BaseHTTPServer (V. 06) do in line 43 :
self.copyfile(f, self.wfile)
copyfile is defined in line 146 and just do a
shutil.copyfileobj(source, outputfile)
copyfileobj in shutil is defined in line 14 and try to read
and write blocks of 16*1024 size.
I changed that and read 1024 byte blocks.
It worked 116 times. After that the IE seams to block.
(shutil (line 20) try to make the fdst.write(buf) but never
finished)
Other WebBrowsers (f.e. Apache) are able to support
bigger sides for the Mac IE 5.1. So it's (at least not only)
an IE problem and should be fixed in the Python Web
Server (IMHO).
Any ideas how to fix ?
I us Python 2.2 but I installed the newest versions of
BasHTTPServer, CGIHTTPServer, SimpleHTTPServer and
SocketServer.
----------------------------------------------------------------------
Comment By: Facundo Batista (facundobatista)
Date: 2004-11-08 21:35
Message:
Logged In: YES
user_id=752496
Please, could you verify if this problem persists in Python 2.3.4
or 2.4?
If yes, in which version? Can you provide a test case?
If the problem is solved, from which version?
Note that if you fail to answer in one month, I'll close this bug
as "Won't fix".
Thank you!
. Facundo
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=812340&group_id=5470
More information about the Python-bugs-list
mailing list