[users@httpd] Re: Http trailers in chunked requests
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 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 > 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 >> 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
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 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 > 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
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 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 > 11111111 > 0 > My-Test-Trailer: some-value-new > >>>>>> > > -- Thanks & Regards Sachin Shetty " I never make mistakeas "
[users@httpd] Http trailers in chunked requests
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 >>
[users@httpd] Apache translates a 401 to 502 from a backend proxy
Hi, Our proxy setup is Apache ==> Haproxy ==> Cherry Py Server Pool We are seeing some weird issues with Apache translating a 401 from a backend haproxy to 502 to the client. The request gets logged as 401 in haproxy logs, but apache logs it as 502 and sends a 502 back to the client. This can be easily reproduced by sending a multipart post request to Apache which forwards to haproxy and haproxy forwards it to cherry py server. Cherry py server sends a 401 back without attempting to read the post request due to some business rules. We see the following in the apache log: [Tue Sep 20 13:00:39 2011] [debug] mod_proxy_http.c(56): proxy: HTTP: canonicalising URL //localhost:9910/put_file [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(1525): [client 127.0.0.1] proxy: *: found reverse proxy worker for http://localhost:9910/put_file [Tue Sep 20 13:00:39 2011] [debug] mod_proxy.c(993): Running scheme http handler (attempt 0) [Tue Sep 20 13:00:39 2011] [debug] mod_proxy_http.c(1962): proxy: HTTP: serving URL http://localhost:9910/put_file [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (*) [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(2067): proxy: connecting http://localhost:9910/put_file to localhost:9910 [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(2193): proxy: connected /put_file to localhost:9910 [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to * [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(2576): proxy: HTTP: connection complete to 127.0.0.1:9910 (localhost) [Tue Sep 20 13:00:39 2011] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network [Tue Sep 20 13:00:39 2011] [error] (103)Software caused connection abort: proxy: pass request body failed to 127.0.0.1:9910 (localhost) [Tue Sep 20 13:00:39 2011] [error] proxy: pass request body failed to 127.0.0.1:9910 (localhost) from 127.0.0.1 () [Tue Sep 20 13:00:39 2011] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (*) It almost seems like Apache is expecting the data (whatever is available) to be read by the downstream process which does not happen. A few interesting things: 1. When I remove apache from the chain and hit haproxy directly for testing, I see a proper 401 status code as expected 2. When I post a smaller file, say 2KB, it works fine, I see a 401 status code as returned the backend proxy. But when I post a 150+ KB file, it fails with 502 even though the proxy still returned 401. I can send the tcpdump as well if anybody is interested. Thanks Sachin - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org