Comments (2)
Good question. We can send headers when connecting, but I also don't see a way to do it on a per-message basis. send-msg
relies on RemoteEndpoint, which doesn't appear to expose the right interface. Unless I'm missing something in Jetty's API. Happy to accept a patch if you find a solution.
from gniazdo.
Hmm, that's interesting. I saw that you can pass in headers and params at connection time.
But I don't know enough about Websocket's message lifecycle to see a way to do it through send-msg
. From the WS RFC , I don't see a way to pass any HTTP header or params.
Buuut, I was able to access the context's request, which had the original connection headers. My code has access to the original headers (in org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest
). That's going to be dependent on your server's WS implementation. But I'm guessing you'll have to do some kind of similar gymnastics.
from gniazdo.
Related Issues (17)
- Sending a cookie along with UpgradeRequest HOT 9
- on-close callback fails silently when it's not set properly HOT 1
- http_proxy support HOT 23
- pls add support for configuring websocket extensions HOT 2
- Proxy Support HOT 4
- Missing license HOT 2
- Configurable max message size? HOT 3
- Max Request Size Issue HOT 2
- Async nature of websockets HOT 2
- Turn off logging of all incoming messages HOT 7
- Strange JVM crash with WebSocket Client HOT 2
- Text message size [146765] exceeds maximum size [65536] HOT 3
- problematic SslContextFactory configuration? HOT 2
- Websocket Ping and Pong messages HOT 3
- Custom WebSocketClients require manual stop HOT 1
- Jetty 10/11 HOT 4
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 gniazdo.