Skip to content

addCookie needs to pass a request object to the Cookie constructor #459

tomhughes opened this Issue Mar 3, 2013 · 5 comments

2 participants


When addCookie calls new Cookie it should be passing an object that has a url member as the second argument as the cookie constructor will expect to be able to use that if the cookie attributes don't include a path.


Here's a simple test case that demonstrates the problem:

var request = require('request');

request("", function (error, response, body) {
@tomhughes tomhughes referenced this issue in mapbox/millstone Mar 3, 2013

Update underscore dependency #96

request member
mikeal commented Mar 3, 2013

what is the expected shape of the url property? the Request object has that property but it's a parsed uri object.


Well it does url.parse(req.url).pathname so I think it just wants it to be the text of the url.

request member
mikeal commented Aug 28, 2014

Is this still an issue?

This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.

@mikeal mikeal closed this Aug 28, 2014

My test case seems to work in newer versions of request so I suspect you're right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.