Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

node now returns headers in array breaking tobi #28

Closed
wants to merge 1 commit into from

3 participants

@eugeneware

At least in v0.4.4 of node.js res.headers['set-cookie'] returns an array and not a string anymore which breaks tobi.

@tj
tj commented

thanks!

@tj tj closed this
@kivikakk

I just ran into this issue with our stuff, and yours was the first Google SERP ಠ_ಠ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 3, 2011
  1. @eugeneware
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/browser.js
View
4 lib/browser.js
@@ -178,7 +178,9 @@ Browser.prototype.request = function(method, path, options, fn, saveHistory){
// Cookies
if (res.headers['set-cookie']) {
- self.cookieJar.add(new Cookie(res.headers['set-cookie']));
+ res.headers['set-cookie'].forEach(function(cookie) {
+ self.cookieJar.add(new Cookie(cookie));
+ });
}
// Success
Something went wrong with that request. Please try again.