[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-10 Thread Charles-François Natali
Charles-François Natali added the comment: According to http://tools.ietf.org/html/rfc2616#section-8.1, persistent connections are default in HTTP 1.1. However, here's what's said about the persistence negotiation: An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to maintain a

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Furthermore, BaseHTTPServer responds with a HTTP/1.0 status line (not HTTP/1.1), meaning persistent connections are not the default. Therefore, I'm closing as invalid. -- resolution: - invalid status: open - closed

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-09 Thread Charles-François Natali
Charles-François Natali added the comment: wget trace: Here a 404 is treated correctly: socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(4242), sin_addr=inet_addr(127.0.0.1)}, 16) = 0 select(6, NULL, [5], NULL, {900, 0})= 1 (out [5], left {900, 0})

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-08 Thread Mikhail Afanasyev
Mikhail Afanasyev added the comment: The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15991

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. Well, perhaps it uses wget too? If you really think this is a bug in Python, you have to diagnose it further (for example by

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-08 Thread Charles-François Natali
Charles-François Natali added the comment: The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. Debian uses wget. -- ___ Python tracker rep...@bugs.python.org

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-10-08 Thread Charles-François Natali
Charles-François Natali added the comment: The bug is not only wget-specific. It was discovered while making APT proxy, so at least Debian APT fetcher has the same problem. Debian uses wget. I meant apt-get uses wget. -- ___ Python tracker

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-09-23 Thread Thomas Lee
Thomas Lee added the comment: I can reproduce this on Debian Wheezy. Both with the system Python (2.7.3rc2) and the 2.7 branch built from source. -- nosy: +thomaslee ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15991

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can reproduce under Debian testing, but not Debian stable nor Mageia 1. I think this is really a bug in recent Debian/Ubuntu wget. By instrumenting SocketServer, I see that less requests are received than expected (e.g. ~350 instead of 400). It seems wget

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that forcing a content length on error responses also seems to make wget happy: diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py --- a/Lib/BaseHTTPServer.py +++ b/Lib/BaseHTTPServer.py @@ -362,14 +362,19 @@ message = short

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-09-21 Thread Catalin Iacob
Catalin Iacob added the comment: Can't reproduce this on openSUSE Factory (development version, what will become 12.3). I tried with openSUSE's Python 2 which is 2.7.3 and with self compiled up to date 2.7 branch from hg. For each of these I bumped the number of files to 3000 instead of 300

[issue15991] BaseHTTPServer with ThreadingMixIn serving wrong data sometimes

2012-09-20 Thread Mikhail Afanasyev
New submission from Mikhail Afanasyev: When using BaseHTTPServer with ThreadingMixIn, sometimes the wrong data is served. The attached script requests normal URL and URLs which are not found in multiple threads using wget (which only saves pages if it gets 200 OK status). Every once in a