Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Cookie handling kills hand-rolled cookie headers #115

timoxley opened this Issue Nov 24, 2011 · 4 comments


None yet
2 participants

Before, we were setting the cookies manually via the header:

  url: 'http://someurl.com',
  headers: {
    'Cookie': sessionCookie

but since the introduction of the built-in cookie handling in request 2.2+, this has broken. I now have to do:

var request = require('request').defaults({jar: false})

…in every file that used the headers mechanism.

Perhaps the cookie system shouldn't override the Cookie header if it already exists?


mikeal commented Nov 24, 2011

yeah, we shouldn't set the cookie header if it's already set.

should be a simple fix.


mikeal commented Feb 18, 2012

this was fixed.

@mikeal mikeal closed this Feb 18, 2012

Really? I ran into this issue again (forgetting .defaults({jar: false}) ) just two days ago.


mikeal commented Feb 18, 2012

a check for headers.cookie was merged in to master a while back, might not be in a release yet. can you test with master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment