Issues with Cookies being cleared on in version 2.22.1 #591

Closed
n99 opened this Issue Jul 10, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@n99

n99 commented Jul 10, 2013

Hi
Noticed this version is accompanied with comments
"global cookie jar disabled by default, send jar: true to enable."
this is great :)

I've pulled down version 2.22.1 and am using it with default settings for a Basic Auth request.

However, I can still see cookies set from previous requests being sent with subsequent requests while snooping the http traffic.......

Also Is there a method to clear state at all? ie "request.clear()" or something?

cheers

@n99

This comment has been minimized.

Show comment Hide comment
@n99

n99 Jul 11, 2013

It's something quite fundamental that needs fixing urgently if there is
still an issue
Cheers

On 11 July 2013 00:38, Eric Man notifications@github.com wrote:

I have seen this happening too.


Reply to this email directly or view it on GitHubhttps://github.com/mikeal/request/issues/591#issuecomment-20781289
.

Nomit Babraa
Corporate Information and Computing Services
10-12 Brunswick Street
Sheffield
S10 2FN
Tel: 0114 222 1162

n99 commented Jul 11, 2013

It's something quite fundamental that needs fixing urgently if there is
still an issue
Cheers

On 11 July 2013 00:38, Eric Man notifications@github.com wrote:

I have seen this happening too.


Reply to this email directly or view it on GitHubhttps://github.com/mikeal/request/issues/591#issuecomment-20781289
.

Nomit Babraa
Corporate Information and Computing Services
10-12 Brunswick Street
Sheffield
S10 2FN
Tel: 0114 222 1162

@mikeal

This comment has been minimized.

Show comment Hide comment
@mikeal

mikeal Jul 15, 2013

Member

any thoughts @threepointone ?

Member

mikeal commented Jul 15, 2013

any thoughts @threepointone ?

@threepointone

This comment has been minimized.

Show comment Hide comment
@threepointone

threepointone Jul 15, 2013

Contributor

I just tried this (edit: with master)-

var r = request({url: 'http://www.google.com', jar: null}, function(err, res){
    console.log('req1', r.headers);
    console.log('res1', res.headers);
    var r2 = request({url: 'http://www.google.com', jar: null}, function(err, res2){
        console.log('req2', r2.headers);
        console.log('res2', res2.headers);
    });
});

with jar as null, true, false. the headers seem to be as expected. @n99 - got a code sample I can see?

Contributor

threepointone commented Jul 15, 2013

I just tried this (edit: with master)-

var r = request({url: 'http://www.google.com', jar: null}, function(err, res){
    console.log('req1', r.headers);
    console.log('res1', res.headers);
    var r2 = request({url: 'http://www.google.com', jar: null}, function(err, res2){
        console.log('req2', r2.headers);
        console.log('res2', res2.headers);
    });
});

with jar as null, true, false. the headers seem to be as expected. @n99 - got a code sample I can see?

@threepointone

This comment has been minimized.

Show comment Hide comment
@threepointone

threepointone Jul 15, 2013

Contributor

also, to clear state, simply use a new jar

request({url: 'http://www.mysite.com', jar: request.jar()}, function(err, res){});
Contributor

threepointone commented Jul 15, 2013

also, to clear state, simply use a new jar

request({url: 'http://www.mysite.com', jar: request.jar()}, function(err, res){});
@threepointone

This comment has been minimized.

Show comment Hide comment
@threepointone

threepointone Jul 15, 2013

Contributor
@mikeal

This comment has been minimized.

Show comment Hide comment
@mikeal

mikeal Jul 23, 2013

Member

new version was recently released.

Member

mikeal commented Jul 23, 2013

new version was recently released.

@mikeal mikeal closed this Aug 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment