[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-21 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the report Rolf. I'll look into your suggestion for this patch. Antoine: Given beta is slated for the 24th and Martin's legitimate concerns, I think it might be a little hasty to get this in before feature freeze. Knocking it back to 3.6 (obviously f

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-21 Thread Rolf Krahl
Rolf Krahl added the comment: Hi again, first of all, sorry for not contributing to the discussion for such a long time. I was quite busy lately. I tested the patch with Python 3.5.0a3. It works nicely for my use case. Thanks a lot! I have one issue though: urllib's HTTPHandler and HTTPSH

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-21 Thread Martin Panter
Martin Panter added the comment: I left some new comments. However I remain concerned at how complicated and overloaded the API is becoming. It certainly makes it hard to review for correctness. I could easily have missed some corner case that is broken by the changes. There are a lot of odd

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-20 Thread Demian Brecht
Demian Brecht added the comment: BTW, thanks for the reviews Martin and the nudge Antoine! -- ___ Python tracker ___ ___ Python-bugs-l

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-20 Thread Demian Brecht
Demian Brecht added the comment: Latest patch should address all outstanding comments. -- Added file: http://bugs.python.org/file39447/issue12319_6.patch ___ Python tracker ___ _

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-19 Thread Demian Brecht
Demian Brecht added the comment: > What's the status on this one? It looks like some review comments need > addressing. That's about it. Unfortunately I've been pretty tied up over the last month and a bit. I'll try to get to hopefully closing this out over the next few days. --

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: What's the status on this one? It looks like some review comments need addressing. -- ___ Python tracker ___ __

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-04-01 Thread Demian Brecht
Changes by Demian Brecht : Added file: http://bugs.python.org/file38797/issue12319_5.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-04-01 Thread Martin Panter
Martin Panter added the comment: The incremental improvement thing sounds good. Here are some things which I think are orthogonal to sensible chunked encoding: * Automagic seeking to determine Content-Length * Setting Content-Length for iterables that are neither strings, iterators nor files (

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-31 Thread Demian Brecht
Demian Brecht added the comment: Agreed. However, I'm wondering if that should belong in a new issue geared towards further clarifying behaviour of request body types. The patch introduces the behaviour this specific issue was looking, with the largest change being that iterators may now resul

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-31 Thread Martin Panter
Martin Panter added the comment: Perhaps you should make a table of some potential body object types, and figure out what the behaviour should be for request() with and without relevant headers, and endheaders() and send() with and without encode_chunked=True: * Add/don’t add Content-Length/Tr

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-31 Thread Demian Brecht
Changes by Demian Brecht : Added file: http://bugs.python.org/file38772/issue12319_4.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-24 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the review Martin. > However I understand Rolf specifically wanted chunked encoding to work with > the existing urlopen() framework, at least after constructing a separate > opener object. I think that should be practical with the existing > HTTPCon

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-24 Thread Demian Brecht
Changes by Demian Brecht : Added file: http://bugs.python.org/file38670/issue12319_3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-24 Thread Martin Panter
Martin Panter added the comment: I left a few comments on Reitveld, mainly about the documentation and API design. However I understand Rolf specifically wanted chunked encoding to work with the existing urlopen() framework, at least after constructing a separate opener object. I think that s

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-17 Thread Demian Brecht
Demian Brecht added the comment: Updated patch changes the following: + Removes support for trailers in requests as they're not supported + If Transfer-Encoding is explicitly set by the client, it's assumed that the caller will handle all encoding (backwards compatibility) + Fixed a bug where c

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-07 Thread Demian Brecht
Demian Brecht added the comment: After sleeping on this, I think that the best route to go would be to drop the trailer implementation (if it's not practical it doesn't belong in the standard library). Also, to better preserve backwards compatibility it may be better to circumvent the automat

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-06 Thread Demian Brecht
Demian Brecht added the comment: FWIW, so far I've tested this change against: cherrypy 3.6.0 uwsgi 2.0.9 (--http-raw-body) nginx 1.6.2 (chunked_transfer_encoding on, proxy_buffering off;) + uwsgi 2.0.9 (--http-raw-body) The chunked body works as expected. Unfortunately, all implementations se

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht
Changes by Demian Brecht : Added file: http://bugs.python.org/file38352/issue12319_1.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht
Demian Brecht added the comment: Also note that this patch includes the changes in #23350 as it's directly relevant. -- ___ Python tracker ___ __

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht
Changes by Demian Brecht : -- versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht
Demian Brecht added the comment: I hit "submit" a little too soon. The intention of the patch is to adhere to all aspects of Transfer-Encoding as specified in the RFC and to make best guesses as to encoding that should be used based on the data type of the given body. This will break backward

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht
Demian Brecht added the comment: I've attached a patch that implements full Transfer-Encoding support for requests as specified in RFC 7230. -- ___ Python tracker ___ __

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-02-15 Thread Rolf Krahl
Rolf Krahl added the comment: The design goal for my implementation was compatibility. My version can be used as a drop in replacement for the existing urllib's HTTPHandler. The only thing that need to be changed in the calling code is that it must call build_opener() to select the chunked h

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-02-14 Thread Martin Panter
Martin Panter added the comment: One interesting question is how to convey data to the chunked encoder. There are two sets of options in my mind, a pull interface: * iterable: seems to be the popular way amoung commenters here * file reader object: encoder calls into stream’s read() method and

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2014-08-29 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2014-08-28 Thread Rolf Krahl
Rolf Krahl added the comment: Thanks for the notice! As far as I read from the link you cite, getting rid of the current httplib in urllib3 is planned but far from being done. Furthermore, I don't like packages with too many 3rd party dependencies. Since my package is working fine with the

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2014-08-28 Thread Piotr Dobrogost
Piotr Dobrogost added the comment: @Rotkraut The truth is http in stdlib is dead. Your best option is to use 3rd party libs like requests or urllib3. Authors of these libs plan to get rid of httplib entirely; see "Moving away from httplib" (https://github.com/shazow/urllib3/issues/58)

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2014-08-28 Thread Rolf Krahl
Rolf Krahl added the comment: I'd like to support the request. I have a use case where I definitely need this feature: I maintain a Python client for a scientific metadata catalogue, see [1] for details. The client also features the upload of the data files. The files may come in as a data

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2014-07-25 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2014-07-25 Thread Adam Tauno Williams
Changes by Adam Tauno Williams : -- nosy: +whitemice ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2012-10-10 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > We had support for chunked transfer encoding for POST method recently, > which is exposed via urllib2 wrapper function. I couldn't find what you're talking about. If I look at AbstractHTTPHandler.do_request_, it actually mandates a Content-Length header for

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: We had support for chunked transfer encoding for POST method recently, which is exposed via urllib2 wrapper function. PUT is not exposed via urllib2 and users should use httplib. This feature of chunked transfer can be added to PUT by taking the body of the

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-15 Thread harobed
harobed added the comment: > Now I'm confused. Per the HTTP specification, GET requests don't have a body, so "Transfer-Encoding: chunked" doesn't apply to them. > Are you sure you don't confuse with the response that the server sends? In responses, "Transfer-Encoding: chunked" is very common.

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-13 Thread Petri Lehtinen
Petri Lehtinen added the comment: harobed wrote: > I use http.client in WebDAV client. > > Mac OS X Finder WebDAV client perform all his request in "chunk" mode : PUT > and GET. > > Here, I use http.client to simulate Mac OS X Finder WebDAV client. Now I'm confused. Per the HTTP specification,

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-13 Thread harobed
harobed added the comment: I use http.client in WebDAV client. Mac OS X Finder WebDAV client perform all his request in "chunk" mode : PUT and GET. Here, I use http.client to simulate Mac OS X Finder WebDAV client. Regards, Stephane -- ___ Python

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-13 Thread Petri Lehtinen
Petri Lehtinen added the comment: What's the use case? Do you have an iterable that yields data whose size is unknown? AFAIK, most web servers don't even support chunked uploads. (Removing Python 2.7 from versions as this is clearly a feature request.) -- nosy: +petri.lehtinen type:

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2011-06-12 Thread harobed
New submission from harobed : Hi, HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data. Exemple, I can't do PUT request with chunk transfert. Regards, Stephane -- components: Library (Lib) messages: 138203 nosy: harobed priority: normal severity: normal stat