Message8223

Author jeff.allen
Recipients jeff.allen
Date 2014-01-12.20:11:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389557512.13.0.35375704896.issue2109@psf.upfronthosting.co.za>
In-reply-to
Content
test_version_none hangs without even the request line reaching the server (no log messages):

test_version_none (__main__.BaseHTTPServerTestCase) ... send: 'PUT / \r\nHost: localhost:51309\r\nAccept-Encoding: identity\r\n\r\n'

The test failure is not wholly repeatable but depends on preceding activity. (I can't find anything in the test itself to explain this: it appears to create the client and server afresh each time.) If all other tests are skipped, test_version_none runs reliably.

But it also runs reliably, even in the context of other tests, if the PUT request contains a "Content-Length" header:

test_version_none (__main__.BaseHTTPServerTestCase) ... send: 'PUT / \r\nHost: localhost:51374\r\nAccept-Encoding: identity\r\nContent-Length: 0\r\n\r\n'

127.0.0.1 - - [12/Jan/2014 20:02:45] (parse_request) raw request line: 'PUT / \r\n'
127.0.0.1 - - [12/Jan/2014 20:02:45] (parse_request) words: ['PUT', '/']
127.0.0.1 - - [12/Jan/2014 20:02:45] (parse_request) look-ahead: 'Host: localhost:51374\r\nAccept-Encoding: identity\r\nContent-Length: 0\r\n\r\n'
127.0.0.1 - - [12/Jan/2014 20:02:45] code 400, message Bad HTTP/0.9 request type ('PUT')
127.0.0.1 - - [12/Jan/2014 20:02:45] "PUT / " 400 -
127.0.0.1 - - [12/Jan/2014 20:02:45] (send_response) HTTP/1.1 400 "Bad HTTP/0.9 request type ('PUT')"
127.0.0.1 - - [12/Jan/2014 20:02:45] (send_header) Server: BaseHTTP/0.3 Python/2.7b1+
127.0.0.1 - - [12/Jan/2014 20:02:45] (send_header) Date: Sun, 12 Jan 2014 20:02:45 GMT
127.0.0.1 - - [12/Jan/2014 20:02:45] (send_header) Content-Type: text/html
127.0.0.1 - - [12/Jan/2014 20:02:45] (send_header) Connection: close
reply: "HTTP/1.1 400 Bad HTTP/0.9 request type ('PUT')\r\n"
header: Server: BaseHTTP/0.3 Python/2.7b1+
header: Date: Sun, 12 Jan 2014 20:02:45 GMT
header: Content-Type: text/html
header: Connection: close
ok

My theory is that the BFE is intercepting the request and waiting for data following.
History
Date User Action Args
2014-01-12 20:11:52jeff.allensetmessageid: <1389557512.13.0.35375704896.issue2109@psf.upfronthosting.co.za>
2014-01-12 20:11:52jeff.allensetrecipients: + jeff.allen
2014-01-12 20:11:52jeff.allenlinkissue2109 messages
2014-01-12 20:11:51jeff.allencreate