Skip to content

Loading…

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

Closed
tomhughes opened this Issue · 5 comments

2 participants

@tomhughes

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.

@tomhughes

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

var request = require('request');

request("https://docs.google.com/a/dbsgeo.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AqV4OJpywingdFNYLXpKMmxqMG1lWTJzNE45ZUVnNlE&single=true&gid=0&output=csv&ndplr=1", function (error, response, body) {
  console.log(response.statusCode);
});
@tomhughes tomhughes referenced this issue in mapbox/millstone
Merged

Update underscore dependency #96

@mikeal
request member

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

@tomhughes

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

@mikeal
request member

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
@tomhughes

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.