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: BasHTTPServer IE Mac 5.1 size problem
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: coderscom, facundobatista
Priority: normal Keywords:

Created on 2003-09-25 09:24 by coderscom, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Messages (3)
msg18353 - (view) Author: Sven Passig (coderscom) Date: 2003-09-25 09:24
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.
msg18354 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2004-11-09 00:35
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
msg18355 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2005-03-21 17:33
Logged In: YES 
user_id=752496

Deprecated. Reopen only if still happens in 2.3 or newer. 

.    Facundo
History
Date User Action Args
2022-04-10 16:11:22adminsetgithub: 39298
2003-09-25 09:24:15coderscomcreate