Skip to content

Commit ab4106c

Browse files
danielmcqbmeck
authored andcommitted
Added fix to ensure that the request_domain and request_path get passed to the Cookie constructor.
1 parent b94f312 commit ab4106c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cookiejar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434
return this;
3535
}
36-
return new Cookie(cookiestr);
36+
return new Cookie(cookiestr, request_domain, request_path);
3737
}
3838
exports.Cookie = Cookie;
3939

@@ -247,7 +247,9 @@
247247
var successful = [],
248248
i,
249249
cookie;
250-
cookies = cookies.map(Cookie);
250+
cookies = cookies.map(function(item){
251+
return Cookie(item, request_domain, request_path);
252+
});
251253
for (i = 0; i < cookies.length; i += 1) {
252254
cookie = cookies[i];
253255
if (this.setCookie(cookie, request_domain, request_path)) {

0 commit comments

Comments
 (0)