New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IncompleteRead: IncompleteRead(168 bytes read) #55672
Comments
Hi folks, The Code Sample auth = "WHM my_user:%s" % "HASHHASHHASHHASH"
_opener = urllib2.build_opener()
_opener.addheaders = [('Authorization', auth)]
url = "http://my_cpanel_url/scripts/remote_suspend?user=%s" % "user_on_cpanel_name"
try:
f = _opener.open(url)
except urllib2.HTTPError, e:
raise OperationError(e)
result = f.read() # <-- IncompleteRead except HERE
f.close()
print result.strip() |
Luís, please analyse the response from the web server to see if it really is a valid HTTP response - AFAIK CPanel web services do not always give valid HTTP responses. |
Yes, please ensure that server is returning a proper HTTP response. Test it against browser or curl and see if they work. If they work, then it needs to be investigated as why 'http.client' is not working. |
2.6 is only open for security issues, so any verification should use later version. |
Since the reporter did not get back with more details (testing against curl or a HEAD output to eliminate server issues), I am closing this issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: