Skip to content
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

Closed
caitifbrito mannequin opened this issue Mar 11, 2011 · 5 comments
Closed

IncompleteRead: IncompleteRead(168 bytes read) #55672

caitifbrito mannequin opened this issue Mar 11, 2011 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@caitifbrito
Copy link
Mannequin

caitifbrito mannequin commented Mar 11, 2011

BPO 11463
Nosy @terryjreedy, @orsenthil, @hdiogenes

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:

assignee = 'https://github.com/orsenthil'
closed_at = <Date 2011-03-19.08:39:47.639>
created_at = <Date 2011-03-11.02:02:28.200>
labels = ['invalid', 'type-bug', 'library']
title = 'IncompleteRead: IncompleteRead(168 bytes read)'
updated_at = <Date 2011-03-19.08:39:47.638>
user = 'https://bugs.python.org/caitifbrito'

bugs.python.org fields:

activity = <Date 2011-03-19.08:39:47.638>
actor = 'orsenthil'
assignee = 'orsenthil'
closed = True
closed_date = <Date 2011-03-19.08:39:47.639>
closer = 'orsenthil'
components = ['Library (Lib)']
creation = <Date 2011-03-11.02:02:28.200>
creator = 'caitifbrito'
dependencies = []
files = []
hgrepos = []
issue_num = 11463
keywords = []
message_count = 5.0
messages = ['130540', '130542', '130664', '131394', '131401']
nosy_count = 4.0
nosy_names = ['terry.reedy', 'orsenthil', 'hdiogenes', 'caitifbrito']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue11463'
versions = []

@caitifbrito
Copy link
Mannequin Author

caitifbrito mannequin commented Mar 11, 2011

Hi folks,
I have an app that talk with cPanel for create/suspend/unsuspend/kill domaind.. So when I use the urllib2 to get response for cPanel and read it. It show the IncompleteRead except.
I get the same URL in a browser and the response is ok. With lib it's broked.

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()

@caitifbrito caitifbrito mannequin added the performance Performance or resource usage label Mar 11, 2011
@hdiogenes
Copy link
Mannequin

hdiogenes mannequin commented Mar 11, 2011

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.

@hdiogenes hdiogenes mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error and removed performance Performance or resource usage labels Mar 11, 2011
@orsenthil
Copy link
Member

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.

@orsenthil orsenthil self-assigned this Mar 12, 2011
@terryjreedy
Copy link
Member

2.6 is only open for security issues, so any verification should use later version.

@orsenthil
Copy link
Member

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants