httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Kaluža <>
Subject Re: mod_proxy_wstunnel ignores proxy_wstunnel_transfer errors
Date Wed, 18 Mar 2015 08:48:04 GMT
On 03/18/2015 09:23 AM, Yann Ylavic wrote:
> On Wed, Mar 18, 2015 at 8:07 AM, Jan Kaluža <> wrote:
>> I have no big knowledge of WebSockets, but it should be possible to detect
>> Switching Protocol header and return HTTP error if some error happens before
>> we switch to WebSocket.
>> Would this be acceptable, or you think this empty reply is not worth fixing
>> this way?
> The problem is that at this point (poll() loop), "101 Switching
> Protocol" is already sent to the backend, and hence the
> ap_proxy_pass_brigade() doing so in proxy_wstunnel_request() should
> already have failed with the correct status code returned to the
> handler.

Hm, I think I'm little bit confused how it's supposed to work. I thought 
mod_proxy_wstunnel appends Upgrade and Connection header to the 
request's headers, sends it to the backend and then the backend responds 
with "101 Switching Protocols".

But when reading the code now, it would mean that "101 Switch Protocols" 
is forwarded to the client, which, I think, should not happen.

Well, I will test it more with some real websocket server as a backend 
to fully understand how it works.

> Why isn't that happening?
>>> Regards,
>>> Yann.

Jan Kaluza

View raw message