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

HTTPResponse.read(amt) fails when response length is UNKNOWN #39743

Closed
gmonroe mannequin opened this issue Dec 31, 2003 · 3 comments
Closed

HTTPResponse.read(amt) fails when response length is UNKNOWN #39743

gmonroe mannequin opened this issue Dec 31, 2003 · 3 comments
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@gmonroe
Copy link
Mannequin

gmonroe mannequin commented Dec 31, 2003

BPO 868571
Nosy @devdanzin

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 = None
closed_at = <Date 2010-08-18.23:57:30.304>
created_at = <Date 2003-12-31.19:18:19.000>
labels = ['easy', 'type-bug', 'library']
title = 'HTTPResponse.read(amt) fails when response length is UNKNOWN'
updated_at = <Date 2010-08-18.23:57:30.302>
user = 'https://bugs.python.org/gmonroe'

bugs.python.org fields:

activity = <Date 2010-08-18.23:57:30.302>
actor = 'BreamoreBoy'
assignee = 'none'
closed = True
closed_date = <Date 2010-08-18.23:57:30.304>
closer = 'BreamoreBoy'
components = ['Library (Lib)']
creation = <Date 2003-12-31.19:18:19.000>
creator = 'gmonroe'
dependencies = []
files = []
hgrepos = []
issue_num = 868571
keywords = ['easy']
message_count = 3.0
messages = ['60438', '60439', '114305']
nosy_count = 4.0
nosy_names = ['gmonroe', 'ajaksu2', 'cropr', 'BreamoreBoy']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'test needed'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue868571'
versions = ['Python 2.6']

@gmonroe
Copy link
Mannequin Author

gmonroe mannequin commented Dec 31, 2003

If the length of the reponse from an HTTPConnection is
unknown, then a read with a specified amount fails.

File "/home/grant/local/lib/python2.3/httplib.py", line
404, in read
self.length -= amt
TypeError: unsupported operand type(s) for -=: 'str'
and 'int'

@gmonroe gmonroe mannequin added the stdlib Python modules in the Lib dir label Dec 31, 2003
@cropr
Copy link
Mannequin

cropr mannequin commented May 24, 2005

Logged In: YES
user_id=17539

I can reproduce the same error.
This happens when the server answers using the HTTP 0.9
protocol.
Apparently the _read_status() is getting confused for some
HTTP 0.9 messages.

@devdanzin devdanzin mannequin added the type-bug An unexpected behavior, bug, or error label Feb 13, 2009
@devdanzin devdanzin mannequin added easy labels Apr 22, 2009
@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Aug 18, 2010

Closed as svn blame shows this is hopelessly out of date.

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

No branches or pull requests

0 participants