Skip to content
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

Cookie handling kills hand-rolled cookie headers #115

Closed
timoxley opened this issue Nov 24, 2011 · 4 comments
Closed

Cookie handling kills hand-rolled cookie headers #115

timoxley opened this issue Nov 24, 2011 · 4 comments

Comments

@timoxley
Copy link

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

request.get({
  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
Copy link
Member

mikeal commented Nov 24, 2011

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

should be a simple fix.

@mikeal
Copy link
Member

mikeal commented Feb 18, 2012

this was fixed.

@mikeal mikeal closed this as completed Feb 18, 2012
@timoxley
Copy link
Author

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

@mikeal
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants