You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by TomFennelly <to...@gmail.com> on 2012/03/08 22:35:25 UTC

[users@httpd] mod_proxy removing/filtering origin response headers

Hi there.

I have a reverse proxy configured, but mod_proxy seems to be removing some
of the response headers that were sent from the origin server.  I need the
ones in question to be passed back to the client (websocket connection
upgrade handshake headers).  Is there a way of configuring this?  I can't
find it anywhere.

Thanks,

Tom.
-- 
View this message in context: http://old.nabble.com/mod_proxy-removing-filtering-origin-response-headers-tp33468056p33468056.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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


[users@httpd] Re: mod_proxy removing/filtering origin response headers

Posted by TomFennelly <to...@gmail.com>.
Looks like this is common enough problem with apache (and proxies in general)
and websockets... http://www.gossamer-threads.com/lists/apache/users/393509
-- 
View this message in context: http://old.nabble.com/mod_proxy-removing-filtering-origin-response-headers-tp33468056p33470889.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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


Re: [users@httpd] mod_proxy removing/filtering origin response headers

Posted by Nick Kew <ni...@webthing.com>.
On 13 Jun 2012, at 01:03, Nick Kew wrote:

> You can implement that.  You can commission a developer to
> implement that (I'd be available).  Or you can make your
> interest known and hope that someone gives their attention
> to it.

If you want to try it yourself, just go through mod_proxy_http.c
and look for the string "hop".  That way you'll find where it identifies
headers as hop-by-hop headers, which appears to be where
websockets differs from HTTP in what your first post complains of.

A five-minute job to hack it.  Testing might take a little longer.

-- 
Nick Kew

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


Re: [users@httpd] mod_proxy removing/filtering origin response headers

Posted by Nick Kew <ni...@webthing.com>.
On Tue, 12 Jun 2012 22:59:19 +0100
Tom Fennelly <to...@gmail.com> wrote:

> Hi Nick.
> 
> So what exactly should the websocket people have done here?

Looking at your original post in this thread, it's clear the
spec to which they should've paid more attention is HTTP.
IIRC that's RFC2616.

You can't really complain that an HTTP proxy implements the
HTTP spec, but you can tweak it to support other specs.
 
> rfc2774 (http://www.ietf.org/rfc/rfc2774.txt).

(Without looking, I assume that's a websockets spec,
and builds on something that's mostly HTTP, and maybe
100% HTTP where proxies are excluded.)

You can implement that.  You can commission a developer to
implement that (I'd be available).  Or you can make your
interest known and hope that someone gives their attention
to it.

As I said before, it would be very straightforward to implement
what you originally asked for in mod_proxy, or rather more work
to read through that RFC in detail and scour it for any other
deviations from HTTP that haven't bitten you but might in future.


-- 
Nick Kew

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


Re: [users@httpd] mod_proxy removing/filtering origin response headers

Posted by Tom Fennelly <to...@gmail.com>.
Hi Nick.

So what exactly should the websocket people have done here?  I found 
rfc2774 (http://www.ietf.org/rfc/rfc2774.txt).  Is that the spec that 
should have been followed or is there something else?  It says 
"experimental" and it's quite old at this stage.  Just trying to get an 
idea of what they should have done to make websockets work "seamlessly" 
with intermediates.

Regards,

Tom.

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


Re: [users@httpd] mod_proxy removing/filtering origin response headers

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Mar 9, 2012, at 5:46 AM, Nick Kew wrote:
> 
> You could also question why the websockets folks went and abused hop-by-hop
> headers when they could instead have done what HTTP provides for and
> created extension headers to meet their needs without breaking anything!
> 

Why? Because it's *websockets*! Which is "web" in name only...

Everytime someone praises websockets, a baby seal is clubbed to death...


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


Re: [users@httpd] mod_proxy removing/filtering origin response headers

Posted by Nick Kew <ni...@webthing.com>.
On 8 Mar 2012, at 21:35, TomFennelly wrote:

> 
> Hi there.
> 
> I have a reverse proxy configured, but mod_proxy seems to be removing some
> of the response headers that were sent from the origin server.  I need the
> ones in question to be passed back to the client (websocket connection
> upgrade handshake headers).  Is there a way of configuring this?  I can't
> find it anywhere.

You're up against a mismatch of what websockets expect and what HTTP defines.
mod_proxy_http implements HTTP, and can't be held responsible for other
protocols.

Assuming(?) no complexities beyond the headers, it would be straightforward
to hack mod_proxy_http to provide that option (note: NOT do that by default).
It just needs someone to sit down with the websockets spec and go through
the relevant contradictions with HTTP.

You could also question why the websockets folks went and abused hop-by-hop
headers when they could instead have done what HTTP provides for and
created extension headers to meet their needs without breaking anything!

-- 
Nick Kew

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