473,325 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

why can i still able to reproduce the SimpleHTTPServer bug which issaid fixed 3 years ago?

http://bugs.python.org/issue1097597

in my python 2.5.2, i still find these code in SimpleHTTPServer.py,
is that deliberate?
ctype = self.guess_type(path)
if ctype.startswith('text/'):
mode = 'r'
else:
mode = 'rb'
try:
f = open(path, mode)
except IOError:
self.send_error(404, "File not found")
return None
self.send_response(200)
self.send_header("Content-type", ctype)
fs = os.fstat(f.fileno())
self.send_header("Content-Length", str(fs[6])) # <--
obviously, this is not the same with len(f.read()) in windows.
--
Best Regards,
Leo Jay
Jun 27 '08 #1
0 761

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joshua W. Biagio | last post by:
Hello all, I am having difficulty getting the HTTP/1.1 support (i.e. pipelining and persistent connections) for the BaseHTTPServer library to work. When I change the line for the protocol in...
2
by: Jed Parsons | last post by:
Hola - I'm curious about using SimpleHTTPServer as the web server on my home machine. It would pretty much just be hit by me, search robots, and automated attacks :) So, before I ditch...
2
by: Bryan Rasmussen | last post by:
Hey just doing some preliminary testing with SimpleHTTPServer, and i noticed that when i request a resource with a query string parameters that this was not handled. is this correct, or is there...
7
by: Gianni Rondinini | last post by:
http://tagsoup.com/-dev/null-/css/fixed/ this is what i was looking for. it has the fixed things i wanted and works both with internet explorer and firefox. the problem is i can't reproduce it. i...
3
by: Sanghyeon Seo | last post by:
I took some time to write this HOWTO: http://sparcs.kaist.ac.kr/~tinuviel/fepy/howto/simplehttpserver-ironpython-mono-howto.html IronPython seems to get much less interest than it deserves. This...
1
by: Ben | last post by:
Hi there, Perhaps someone can help me. For some reason, when my Python script runs and loads an HTML page in a new browser window at the local host (desktop), the links to my stylesheet and all...
9
by: jbrewer | last post by:
I'm currently implementing an XML-RPC service in Python where binary data is sent to the server via URLs. However, some clients that need to access the server may not have access to a web server,...
0
by: Gabriel Genellina | last post by:
En Fri, 13 Jun 2008 04:02:48 -0300, Leo Jay <python.leojay@gmail.com> escribió: According to http://bugs.python.org/issue839496 it should have been corrected, but apparently the patch was only...
1
by: Terry Reedy | last post by:
"Gabriel Genellina" <gagsl-py2@yahoo.com.arwrote in message news:op.ucokc3o6x6zn5v@gabriel2.softlabbsas.com.ar... En Fri, 13 Jun 2008 04:02:48 -0300, Leo Jay <python.leojay@gmail.com> escribió: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.