When specified, the web server will serve files off the specified URI. For example, if websockify is launched with "--prefix vnc", then users will need to access from the URL http://server/vnc/.
This is useful in deployments where a reverse proxy has multiple upstreams, with websockify being one of the upstream servers.
Instead of returning HTTP 501 lets implement the
other HTTP methods and returns a HTTP 405 Method
Not Allowed.
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
It was added 13 years ago for compatibility when the run script was
converted to a shell script by [1]. The long time has passed since then
and we can assume that users may no longer use it. Removing it allows
us to resolve the confusing name (.py which triggers shell).
[1] 4f6a82159c
Python 3.4 and 3.5 haven't been tested for long time. Enforce
the minimum version so that users may not attempt to use untested
ancient python versions.
Note that Python 3.6 ~ 3.8 already reached their EOL and we may even
remove support for these in the near future.
GitHub is removing Ubuntu 20.04, and Ubuntu 22.04 doesn't have Python
3.6 that we want to continue testing for. Switch to using containers
instead so we have more control over when to deprecate a Python version.
We use the header dict to pass on non-header information to the
authentication plugins. Make sure an evil client isn't trying to sneak
something in that hasn't been verified by us.
Issue found by Kevin Rasmussen.
pypi has changed something in their end that is incompatible with older
Python versions. Fortunately, anything older than 3.6 is no longer that
interesting as that is the new baseline set by the oldest enterprise
distributions.
If the peer doesn't send us a close code, then don't send any code back
in the response. Sending 1005 is explicitly wrong as the specification
states that code should only be used locally and never be sent over the
network.
GitHub has deprecated 18.04, so we can't continue running tests on that
old distribution. Unfortunately, we can't switch to the latest 22.04
since GitHub doesn't package anything older than Python 3.7 for that
runner.
And unfortunately the oldest version in 20.04 is Python 3.5, so we have
to remove the test runs for Python 3.4.