|
From: Florent G. <li...@fg...> - 2012-06-11 15:28:07
|
Stéphane S. wrote: Salut, > expath-http client module uses the HTTP 1.1 Transfer-Encoding: > chunked header instead of the Content-Length header [1] Yes, by default it uses HTTP/1.1, which introduced chunked transport. I think using HTTP/1.1 is not really limitating in, you know, 2012. > which explain my problem If chunked transport is the root of the problem, then you have two possible solutions: using HTTP/1.0, or disabling chunking. You must be able to do either of them by setting the appropriate system properties (the EXPath HTTP Client uses the Apache HTTP Client 4). Setting HTTP/1.0 can also be done, as you found, by setting http:request/@http-version to "1.0". Just a word about the difference between both approaches: using properties is probably better if your environment is limited to HTTP/1.0 (e.g. because of a limited proxy), setting the HTTP version on http:request is propbably better if the request itself is limited to HTTP/1.0 (e.g. the example you found in the sources because the *target web server* does not understand 1.1). > So I concluded there is an "http-version" attribute which is > not documented in the specification [4] Yes. The corresponding spec has not been released yet. There was already an undocumented attribute to set the HTTP version, but it was named @http. It was renamed to @http-version when it was added to the spec (well, to its unreleased yet draft). > My conclusion is that Florent Georges, the developer of the > expath http client, hasn't yet packaged the latest version of > the code which support the http-version attribute ? Could > anyone confirm my conclusion ? Exact. Will announce the new release on the EXPath mailing list once it's ready (by the way, there are more chances I see your emails more quickly on the EXPath mailing list than here, just in case...) Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ |