Martin Panter added the comment:
For the record, it looks like there were a few distinct but related problems
here:
* Passing any StringIO object as the body is not supported (see
https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.request),
because no StringIO class
R. David Murray added the comment:
Length computation is being dealt with in issue 23350.
--
resolution: - duplicate
stage: needs patch - resolved
status: open - closed
superseder: - Content-length is incorrect when request body is a list or tuple
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12327
___
___
Mark Lawrence added the comment:
@harobed if you still have a problem please provide more data as requested in
msg138692.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12327
Senthil Kumaran sent...@uthcode.com added the comment:
Hello Stephane,
I use HTTPConnection to simulate Apple Finder WebDAV client. When
this WebDAV client do PUT request, it transmit data in chunked
encoding mode and not set Content-Length HTTP field.
Do you understand my context ?
Is
harobed steph...@harobed.org added the comment:
But if the len information is available, why not return it?
I use HTTPConnection to simulate Apple Finder WebDAV client.
When this WebDAV client do PUT request, it transmit data in chunked encoding
mode and not set Content-Length HTTP field.
Do
R. David Murray rdmur...@bitdance.com added the comment:
The code you are suggesting patching is trying its best to return a length. If
that code needs to be fixed to not throw an error when confronted with a
StringIO, then it should do its best to return a length. Your original message
on
New submission from harobed steph...@harobed.org:
Hi,
in httplib.HTTPConnection._send_request (Python 2.6)
in httplib.HTTPConnection._set_content_length (Python 2.7)
and http.client.HTTPConnection._set_content_length (Python 3.3)
there are something like that :
try:
thelen
R. David Murray rdmur...@bitdance.com added the comment:
fileno and stat won't work on a StringIO object. So StringIO would need to be
special cased to call getvalue.
--
nosy: +orsenthil, r.david.murray
___
Python tracker rep...@bugs.python.org
harobed steph...@harobed.org added the comment:
fileno and stat won't work on a StringIO object. So StringIO would need to
be special cased to call getvalue.
Yes, but it isn't important in chunk transfer encoding.
--
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
But if the len information is available, why not return it?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12327
___
Changes by R. David Murray rdmur...@bitdance.com:
--
versions: +Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12327
___
___
12 matches
Mail list logo