httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: svn commit: r1602523 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c proxy_util.c
Date Sat, 14 Jun 2014 19:36:44 GMT
On Sat, Jun 14, 2014 at 3:29 PM, Jim Jagielski <jim@jagunet.com> wrote:
>
> On Jun 14, 2014, at 7:06 AM, Eric Covener <covener@gmail.com> wrote:
>
>> On Fri, Jun 13, 2014 at 5:10 PM,  <jim@apache.org> wrote:
>>> Allow for "magic" scheme "auto" which makes the scheme of
>>> the backend worker match whatever the scheme of the
>>> incoming request was...
>>>
>>> For example:
>>>
>>>   ProxyPass / auto://foo.example.com/
>>>
>>> If the incoming request is http:.../lala then
>>> the resultant will be http://foo.example.com/lala
>>>
>>> If it's wws:.../lolo then we'd send
>>> wws://foo.example.com/lolo
>>
>>
>> Does this work for websockets? Isn't the scheme http:// + Upgrade for
>> websockets?
>>
>> I thought "auto" would mean the handlers would second-guess the
>> scheme, but if we replace it in proxy_util.c they cannot do that
>> anymore.
>
>
> I thought the idea/issue was that we wanted, for
> example, an incoming http request to be handled by the
> http proxy scheme handler and if it was ws, to be
> handled by the ws scheme handler. This was not
> possible with the normal setup

But a websockets request is a http scheme (really no explicit scheme)
+ an upgrade header.

GET /chat HTTP/1.1
Connection: Upgrade
Upgrade: websocket
Host: 127.0.0.1:8080
Origin: 127.0.0.1:8080
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: MTMtMTQwMjc3NDQxMzE0Ng==

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: fVFPYVP6z6n4b2wNyVnJz25W2Os=

.....&c.....&.d....

Mime
View raw message