New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revised fix for nested array bug in Set-Cookie headers #261
Conversation
Well no, now you simply cannot add to it |
Can't just guess :p. What are the steps to reproduce the bug again? |
Here's the simplest example I can come up with (you'll need an index.jade and layout.jade in the views directory as well, but it doesn't really matter what they are). Run this and load http://:3000/ and then check your cookies. You'll have test=test and test=test,connect.sid=...., and no connect.sid cookie.
|
looks fine to me, I get both as expected |
ps logger() should be at the top above bodyParser() so that it can enclose itself over the entire response to tell you what the response time was |
1 similar comment
ps logger() should be at the top above bodyParser() so that it can enclose itself over the entire response to tell you what the response time was |
I just ran into this when I'm setting two cookies in a single response using |
Re 'patched twice' observation, it might be due to a node-inspector flaw because log traces don't show the same. What I do see in outgoing response header is:
where Originally, one of the two |
@donpark can you gist the snippet causing the issue? |
Finally cornered the bastard. It happens when |
Oops. It turned out not to be If Installing |
ah :( fuck, yeah, it kinda sucks that npm doesn't give you the same exports when it's possible for the single module to satisfy the dependency. It cases lots of gotchas, I've seen tons already but yeah that's a funky one. For "plugin-like" modules I typically leave out the dependency on say connect or express and just assume they will be present |
well, I think NPM should play nice and remove extra copies of same module if origin matches. speaking of origin, another NPM gotcha is that it caches even local version of modules and refuses to install fresh copy off network. so I have to remember to clean NPM cache after playing with a local version of modules. |
I had this issue with Stylus it rendered instanceof completely useless so I had to remove every instanceof in the project haha |
I think this one works, by not changing the Set-Cookie header if it's already an array.