[Python-bugs-list] [ python-Bugs-812340 ] BasHTTPServer IE Mac 5.1 size problem

SourceForge.net noreply at sourceforge.net
Thu Sep 25 05:24:15 EDT 2003


Bugs item #812340, was opened at 2003-09-25 09:24
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=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.

----------------------------------------------------------------------

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