Re: [users@httpd] Re: Http trailers in chunked requests

2015-07-23 Thread Yann Ylavic
On Thu, Jul 23, 2015 at 11:03 AM, Sachin Shetty sachin.she...@gmail.com wrote:

 From the change list, I found
 that you added support for MergeTrailers in 2.4.11 - any idea on how I could
 make it work? I just need apache to let the trailers pass through to the
 upstream haproxy, I am not processing them in mod headers or other apache
 modules.

MergeTrailers on will not put the client's trailers into the ones to
be sent to the backend (as you may expect), but instead it merges them
into client's headers (obviously after those have already been sent to
the backend...).
This directive aims to preserve the previous behaviour of httpd (which
was wrong, but we wanted anyone broken by the change to be able to
recover).
The new default is to discard the trailers (or more exactly to put
them separately in the request/response trailers table, but nothing is
using it for now).

I think you should request an enhancement on the bugzilla for
mod_proxy (at least) to handle/forward the trailers, that's not the
case currently, and I agree this is the sequel.

Please note that the trailers shall not be handled/forwarded blindly,
the RFC 7230 (sections 4.1.2, 4.3 and 4.4) is quite strict about
acceptable trailers and how they ought to be announced in the headers
(TE, Trailer, ...), so clients have to conform too.

Regards,
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Re: Http trailers in chunked requests

2015-07-23 Thread Sachin Shetty
Hi Eric,

Sorry to be bugging you on this one, I grepped through the source and I see
some solid references to trailer processing. From the change list, I found
that you added support for MergeTrailers in 2.4.11 - any idea on how I
could make it work? I just need apache to let the trailers pass through to
the upstream haproxy, I am not processing them in mod headers or other
apache modules.

Thanks
Sachin

On Wed, Jul 22, 2015 at 4:55 PM, Sachin Shetty sachin.she...@gmail.com
wrote:

 Hi,

 I tried with Apache 2.4.16 with the MergeTrailers On. No luck, apache
 just wont let the trailers pass through. I enabled debug log as well, but
 no additional info in logs about skipping trailers.

 Thanks
 Sachin


 On Mon, Jul 20, 2015 at 11:44 AM, Sachin Shetty sachin.she...@gmail.com
 wrote:

 Hi Eric,

 We are using mod proxy and mod rewrite to forward the request to an
 haproxy server running a pool of tomcat. I have verified that when the
 request is directly sent to haproxy, trailers are sent to the tomcat and it
 does print it in the debug logs.

 While debugging this I have also noticed that apache converts a chunked
 request  8KB to a non chunked one and assembled the whole body before
 sending it down the proxy.

 Thanks
 Sachin

 Sorry could not figure out how to post from a digest, I have copied your
 question below:

  What module handles this request, and where are you looking for the
 trailers?


 On Sat, Jul 18, 2015 at 6:27 PM, Sachin Shetty sachin.she...@gmail.com
 wrote:

 Hi,

 as per http spec, we want clients to send us trailers in chunked
 requests. However the request on the server side does not get the trailer
 at all.

 Is there some setting on apache to allow trailers, we are using apache
 2.4.

 Our request looks like this.

 
 telnet somehost 80
 POST /some-path HTTP/1.1
 Authorization: Basic =
 Host: somehost.domain.com
 Transfer-Encoding: chunked
 Trailer: My-Test-Trailer

 50
 
 0
 My-Test-Trailer: some-value-new
 




 --
 Thanks  Regards
 Sachin Shetty

  I never make mistakeas 




[users@httpd] Re: Http trailers in chunked requests

2015-07-22 Thread Sachin Shetty
Hi,

I tried with Apache 2.4.16 with the MergeTrailers On. No luck, apache
just wont let the trailers pass through. I enabled debug log as well, but
no additional info in logs about skipping trailers.

Thanks
Sachin

On Mon, Jul 20, 2015 at 11:44 AM, Sachin Shetty sachin.she...@gmail.com
wrote:

 Hi Eric,

 We are using mod proxy and mod rewrite to forward the request to an
 haproxy server running a pool of tomcat. I have verified that when the
 request is directly sent to haproxy, trailers are sent to the tomcat and it
 does print it in the debug logs.

 While debugging this I have also noticed that apache converts a chunked
 request  8KB to a non chunked one and assembled the whole body before
 sending it down the proxy.

 Thanks
 Sachin

 Sorry could not figure out how to post from a digest, I have copied your
 question below:

  What module handles this request, and where are you looking for the
 trailers?


 On Sat, Jul 18, 2015 at 6:27 PM, Sachin Shetty sachin.she...@gmail.com
 wrote:

 Hi,

 as per http spec, we want clients to send us trailers in chunked
 requests. However the request on the server side does not get the trailer
 at all.

 Is there some setting on apache to allow trailers, we are using apache
 2.4.

 Our request looks like this.

 
 telnet somehost 80
 POST /some-path HTTP/1.1
 Authorization: Basic =
 Host: somehost.domain.com
 Transfer-Encoding: chunked
 Trailer: My-Test-Trailer

 50
 
 0
 My-Test-Trailer: some-value-new
 




 --
 Thanks  Regards
 Sachin Shetty

  I never make mistakeas 



[users@httpd] Re: Http trailers in chunked requests

2015-07-20 Thread Sachin Shetty
Hi Eric,

We are using mod proxy and mod rewrite to forward the request to an haproxy
server running a pool of tomcat. I have verified that when the request is
directly sent to haproxy, trailers are sent to the tomcat and it does print
it in the debug logs.

While debugging this I have also noticed that apache converts a chunked
request  8KB to a non chunked one and assembled the whole body before
sending it down the proxy.

Thanks
Sachin

Sorry could not figure out how to post from a digest, I have copied your
question below:

 What module handles this request, and where are you looking for the
trailers?


On Sat, Jul 18, 2015 at 6:27 PM, Sachin Shetty sachin.she...@gmail.com
wrote:

 Hi,

 as per http spec, we want clients to send us trailers in chunked requests.
 However the request on the server side does not get the trailer at all.

 Is there some setting on apache to allow trailers, we are using apache
 2.4.

 Our request looks like this.

 
 telnet somehost 80
 POST /some-path HTTP/1.1
 Authorization: Basic =
 Host: somehost.domain.com
 Transfer-Encoding: chunked
 Trailer: My-Test-Trailer

 50
 
 0
 My-Test-Trailer: some-value-new
 




-- 
Thanks  Regards
Sachin Shetty

 I never make mistakeas