Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

node now returns headers in array breaking tobi #28

Closed
wants to merge 1 commit into from

3 participants

Eugene Ware TJ Holowaychuk Yuki Izumi
Eugene Ware

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 Holowaychuk
tj commented

thanks!

TJ Holowaychuk tj closed this
Yuki Izumi

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. Eugene Ware
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/browser.js
4 lib/browser.js
View
@@ -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.