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 contains bugs #104
Conversation
@@ -151,7 +151,13 @@ Request.prototype.request = function () { | |||
// fetch cookie from the global cookie jar | |||
var cookies = cookieJar.get({ url: self.uri.href }) | |||
} | |||
if (cookies) {self.headers.Cookie = cookies} | |||
if (cookies) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cookies has to be a string, this way an array is put into cookies; resulting in multiple 'Cookie' headers. This isn't on spec.
…s more consistent to other frameworks, e.g. .NET
…. This is more consistent to other frameworks, e.g. .NET" This reverts commit a06ad2f.
+1 Seeing this error: { stack:
[ 'TypeError: Cannot read property \'url\' of undefined',
' at new Cookie (/some-project/node_modules/request/vendor/cookie/index.js:45:20)',
' at /some-project/node_modules/request/main.js:432:33',
' at Array.forEach (native)',
' at Request.<anonymous> (/some-project/node_modules/request/main.js:426:46)',
' at Request.emit (events.js:64:17)',
' at IncomingMessage.<anonymous> (/some-project/node_modules/request/main.js:391:16)',
' at IncomingMessage.emit (events.js:81:20)',
' at HTTPParser.onMessageComplete (http.js:133:23)',
' at Socket.ondata (http.js:1231:22)',
' at Socket._onReadable (net.js:677:27)' ] } |
@indexzero I probably fixed that error: https://github.com/mikeal/request/pull/106/files |
what's the status on this pull request? there are some comments which I don't believe are resolved and there is also a change that has already been merged which i believe addresses some of the problems. |
This pull request is still active. The other pull request about cookies was about the way it handled the
|
sorry, i mistook the inline comments as unresolved issues, didn't realize at first that you were using them to describe the changes :) |
@mikeal See my inline comments on this pull request.