Comments (9)
I think you can close but, even if the http headers are case-insentitive, I think it will be better to avoid modify the header. But this modification is from http-proxy and so on, in CHP.
from configurable-http-proxy.
Try replacing ws:
with http:
in your default-target
from configurable-http-proxy.
yes, I have the same issue !
from configurable-http-proxy.
I think I found the problem. When I capture the http request packet before the CHP and after it, all capitals in the header are deleted !
In the CHP :
Hypertext Transfer Protocol
GET /websockify HTTP/1.1
Host: 194.X.X.X:6351
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3\r\n
Accept-Encoding: gzip, deflate\r\n
Sec-WebSocket-Version: 13\r\n
Origin: http://194.X.X.X:6341\r\n
Sec-WebSocket-Protocol: binary\r\n
Sec-WebSocket-Extensions: permessage-deflate\r\n
Sec-WebSocket-Key: 6VIYqTOCAUiWzMuFyT2oZg==\r\n
Connection: keep-alive, Upgrade\r\n
Pragma: no-cache\r\n
Cache-Control: no-cache\r\n
Upgrade: websocket\r\n
\r\n
[Full request URI: http://194.X.X.X:6351/websockify]
[HTTP request 1/1]
Out the CHP :
Hypertext Transfer Protocol
GET /websockify HTTP/1.1\r\n
x-forwarded-proto: ws\r\n
x-forwarded-port: 6351\r\n
x-forwarded-for: ::ffff:194.X.X.X\r\n
upgrade: websocket\r\n
cache-control: no-cache\r\n
pragma: no-cache\r\n
connection: keep-alive, Upgrade\r\n
sec-websocket-key: NQJ5RBBD7XmIxLsdFiEfVA==\r\n
sec-websocket-extensions: permessage-deflate\r\n
sec-websocket-protocol: binary\r\n
origin: http://194.X.X.X:6341\r\n
sec-websocket-version: 13\r\n
accept-encoding: gzip, deflate\r\n
accept-language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3\r\n
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0\r\n
host: 194.X.X.X:6351\r\n
\r\n
[Full request URI: http://194.X.X.X:6351/websockify]
[HTTP request 1/1]
from configurable-http-proxy.
HTTP header keys are case-insensitive, so if changing the case affects any behavior, there is a bug in some header handling somewhere.
from configurable-http-proxy.
I confirm this bug which is from http-proxy. The httpProxy.createServer({target:'http://10.22.9.119:80'}).listen(81);
modifies the headers.
All headers of the input message of http://10.22.9.119:80 are in lower case.
A first modification : change the x-forwarded- to X-Forwarded- in respect to the HTTP RFC.
from configurable-http-proxy.
All HTTP headers are case-insensitive according to HTTP specs, so anything that doesn't handle lowercase headers exactly the same as uppercase ones is not implementing HTTP correctly.
from configurable-http-proxy.
Yes, I discovered that the http headers are case-insensitive but it seems that the qemu websocket option is case sensitive ! I will check the qemu code. If I use CHP which target to websockify which target to the qemu vnc, it works
from configurable-http-proxy.
@krakydark and @minrk, Is this issue ready to close? It seems that this is out of the scope of CHP. Thanks.
from configurable-http-proxy.
Related Issues (20)
- `--custom-header` option doesn't work with only one header HOT 7
- Update to commander 9 HOT 3
- Update to ws >= 8 HOT 2
- Update to jasmine >= 4 HOT 1
- Memory leak in proxy? HOT 15
- Add custom-header failed HOT 2
- Release 5.0.0, dropping support for old node version - and more? HOT 14
- Update to use alpine 3.16 as a base image. HOT 4
- Socket leak HOT 41
- jupyterhub/configurable-http-proxy:4.5.3 image vulnerability issue HOT 2
- CHP Docker - permission denied on ssl cert key with properly configured permissions HOT 2
- Container rebuild to resolve open security issues HOT 1
- Routing baseurl problem HOT 5
- Scale the configurable-http-proxy to handle 1000 connections HOT 2
- Request for 4.5.5 release
- EKS container pods unable to communicate with proxy HOT 2
- Document what node version is used for various tags
- Basepath not retained in proxied requests HOT 1
- pre-commit tests fails
- Error when redirecting jupyterhub's stdout to a file on a full partition HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configurable-http-proxy.