Comments (8)
Thanks, let me look into this.
from emacs-websocket.
Looking at this more, I think the only reasonable way to support cookies is to tightly integrate with url-cookie. If we support sending cookies, we probably should support handling set-cookie as well. That means the client needs to call url-cookie-store
before the call to websocket-open
. I'll proceed with this kind of implementation unless you have some specific objection.
from emacs-websocket.
Also, about the port issue - your code implies that the port is needed even if the port is unspecified (in other words, port 80). If true, it seems like a violation of the RFC, which says:
- The request MUST contain a |Host| header field whose value
contains /host/ plus optionally ":" followed by /port/ (when not
using the default port).
from emacs-websocket.
I've written a fix for the port issue to commit b7a1907. I've followed the RFC, though - so no port if it is the default.
I'll merge this to the main branch after you OK it.
from emacs-websocket.
Tested b7a1907 with ein and looks okay to me. EIN was working fine prior to this change, but I discovered not specifying the port in the request header was causing issues when dealing with secured IPython notebook servers. The problem is that without the port Tornado looks in the wrong place for the cookie. Not the most sterling technical explanation, I know, but I hope it makes some sense.
Also, I agree with the approach of calling url-cookie-store
. Thanks for the help!
from emacs-websocket.
Please take a look at 542c6fe and tell me if it works for you. All tests pass, but I don't have an real server to test against with actual cookies.
from emacs-websocket.
Works for me. Thanks very much for implementing this!
from emacs-websocket.
Both changes are now merged into the master branch, and I'll wait a few weeks to see if anyone reports any problems, and release a new version thereafter.
If you'd like me to release before that to fix the user problem, that's fine.
from emacs-websocket.
Related Issues (20)
- websocket-frame-text error HOT 1
- Add release tags HOT 3
- Custom headers in handshake HOT 4
- How to handle an error occured in `websocket-outer-filter`? HOT 6
- A single message ws.send(data); comes in as two messages HOT 5
- Speed feedback HOT 10
- Randomly losing connections under emacs-ipython-notebook with version 1.11 HOT 5
- Error (websocket): in callback `on-message': JSON readtable error HOT 4
- Setting case-fold-search to nil results "Incorrect handhake from websocket" error HOT 7
- declares GPL-3+, but provided full-text license is GPL-2+ HOT 3
- Please tag a 1.12 release HOT 1
- Please consider adapting websocket-functional-test.el to use ert-deftest HOT 12
- TLSv1.3 HOT 1
- Branch rename breaks package installation HOT 6
- websocket-test.el: βfletβ is an obsolete macro (as of [emacs] 24.3) HOT 3
- websocket-to-bytes signal type error HOT 8
- Support connecting through proxies HOT 7
- infinite failure loop - emacs locked up HOT 18
- error 403 with ein over proxy HOT 14
- Push to ELPA? 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 emacs-websocket.