googlearchive / pywebsocket

WebSocket server and extension for Apache HTTP Server for testing
BSD 3-Clause "New" or "Revised" License
309 stars 148 forks source link

Handle CONNECT requests in standalone server #132

Closed GoogleCodeExporter closed 4 years ago

GoogleCodeExporter commented 9 years ago
For web-platform-tests we are using pywebsocket to handle websockets requests. 
This works fine in many situations, but for various reasons, in the Mozilla 
setup we don't change the DNS settings (e.g. via /etc/hosts) but instead use an 
autoproxy file to, in effect, reroute requests from web-platform.test to 
localhost.

With pywebsocket this is a problem because a proxied request requires an 
initial CONNECT that currently can't be handled without adding a seperate proxy 
into the mix; something I am keen to avoid. To handle it in a way that solves 
this use case in pywebsocket itself just requires using HTTP 1.1 and adding 
code that responds to CONNECT with 200 and keeps the connection open.

Original issue reported on code.google.com by ja...@hoppipolla.co.uk on 8 Oct 2014 at 3:20

GoogleCodeExporter commented 9 years ago

Original comment by ja...@hoppipolla.co.uk on 8 Oct 2014 at 3:39

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by tyoshino@chromium.org on 4 Nov 2014 at 8:08

gsnedders commented 4 years ago

This patch landed in web-platform-tests (forking it from upstream) in https://github.com/web-platform-tests/wpt/commit/70f1c91935512d14a3d7bd91203a3fd899d8063a. See https://github.com/web-platform-tests/wpt/pull/21868 for discussion about reverting this in web-platform-tests.

ricea commented 4 years ago

We reverted it in web-platform-tests, so this issue is obsolete.