Closed pensierinmusica closed 9 years ago
You are right, this is something that needs to be fixed in connect-livereload
. cookie-session
and connect-livereload
both overwrite the http writeHead
function. connect-livereload
in this version loads the original function back after it is done, and therefore overwrites the (extended version by cookie-session
) when it was loaded before connect-livereload
.
Needs to be changed...
In the meantime load the cookie-session
middleware after connect-livereload
.
I am also having this problem with express-session and it seems to be fixed by moving connect-livereload to the end of all middlewares.
As doug mentioned in the cookie-session thread, the lines in question are index.js L94-L98.
Happy to spend some time on this issue, considering it wasted almost a day for me already. Anyone have a good strategy in mind for fixing this issue?
@joshperry : Can you test if branch binary-files works well together with cookie-session
?
The restore()
function has been removed in this version. A unit test for this would be welcome too :-)
@andi-neck Yeah, let me give it a try.
When using that branch, livereload does not interfere with the session anymore, but the livereload functionality doesn't work either.
The livereload websocket connects properly and the info
and hello
frames are sent, but no frames are sent when I change a file.
pushed to npm v0.5.2, thx to @joshperry
Please see https://github.com/expressjs/cookie-session/issues/14
Thanks!