I have some python code on both the client and server side. I am getting an IncompleteRead exception thrown for what seems to be no good reason. I can navigate to the URL with Firefox without any error message and also WGET it without any odd results.
The server code is:
import random
import hashlib
print "Content-Type: text/html"
print
m = hashlib.md5()
m.update(str(random.random()))
print m.hexdigest()
print
On the client site, I use a relatively straightforward POST approach:
data = urllib.urlencode({"username": username,
"password" : password})
#POST in the data.
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
string = response.read()
And the response.read() throws the error.
Edit: Further information - Adding explicit CRLF emissions does not alter the change. Checking the error log
[Wed Sep 08 10:36:43 2010] [error] [client 192.168.80.1] (104)Connection reset by peer: ap_content_length_filter: apr_bucket_read() failed
The SSL access log shows(mildly redacted):
192.168.80.1 - - [08/Sep/2010:10:38:02 -0700] "POST /serverfile.py HTTP/1.1" 200 1357 "-" "Python-urllib/2.7"