Redirection 302 issue: response.statuscode == 200 with body == undefined #392

Closed
SebC99 opened this Issue Dec 12, 2012 · 6 comments

Comments

Projects
None yet
5 participants
@SebC99

SebC99 commented Dec 12, 2012

Hello,

I try to make a request call to this url: "http://eultech.fnac.com/dynclick/fnac/?etf-publisher=GoogleProducts&etf-name=GoogleProducts_photos&etf-prdref=4099627&eseg-name=referentiel_produit&eseg-item=Fnac&eurl=http://www.fnac.com/Nikon-1-J1-Noir-Mat-2-Obj-1-Nikkor-CX-VR-10-30-mm-f-3-5-5-6-30-110-mm-f-3-8-5-6-Etui-1-carte-SDHC-8-Go/a4099627/w-4?oref=00000000-0000-0000-0000-000000000000&Origin=CMP_GOOGLE_PS_PHOTO" but the result is very annoying, with a 200 statusCode and no body at all.
When I try with a browser or curl or a rest client, I have one 302 redirection, and I have the real page, with the entire body.
What's happening? Is it the url format? is it the redirection?

Thanks for your help

S.

@SebC99

This comment has been minimized.

Show comment Hide comment
@SebC99

SebC99 Dec 13, 2012

It seems that adding the option jar:false resolves this. Any idea why?
The cookie management by request is not the standard way used by navigator?

SebC99 commented Dec 13, 2012

It seems that adding the option jar:false resolves this. Any idea why?
The cookie management by request is not the standard way used by navigator?

@whitecolor

This comment has been minimized.

Show comment Hide comment
@whitecolor

whitecolor Dec 19, 2012

It seems that I have alike problem I request GET from node.js express.js service that does res.redirect('http://some/url') and in request's callback r.statusCode == 200. I'm not sure if its ok, jar:false doesn't change situation for me, body is ok for me.

It seems that I have alike problem I request GET from node.js express.js service that does res.redirect('http://some/url') and in request's callback r.statusCode == 200. I'm not sure if its ok, jar:false doesn't change situation for me, body is ok for me.

@umutm

This comment has been minimized.

Show comment Hide comment
@umutm

umutm Jan 7, 2013

I had faced the same issue and, yes, jar:false resolves it.

With jar:true, once the cookies are cleaned, the first request should return the response as expected but the second one will be problematic as it also sends the cookies.

Not sure but I believe it is related to the Content-length value being sent with the request with cookies as it is the only variable that changes.

umutm commented Jan 7, 2013

I had faced the same issue and, yes, jar:false resolves it.

With jar:true, once the cookies are cleaned, the first request should return the response as expected but the second one will be problematic as it also sends the cookies.

Not sure but I believe it is related to the Content-length value being sent with the request with cookies as it is the only variable that changes.

@dotnil

This comment has been minimized.

Show comment Hide comment
@dotnil

dotnil Jul 30, 2013

any update on this?

dotnil commented Jul 30, 2013

any update on this?

@mikeal

This comment has been minimized.

Show comment Hide comment
@mikeal

mikeal Jul 30, 2013

Member

cookies are disabled by default now, don't know if that fixes this or not.

Member

mikeal commented Jul 30, 2013

cookies are disabled by default now, don't know if that fixes this or not.

@SebC99

This comment has been minimized.

Show comment Hide comment
@SebC99

SebC99 Aug 3, 2013

in my case, it does!
thanks

SebC99 commented Aug 3, 2013

in my case, it does!
thanks

@SebC99 SebC99 closed this Aug 3, 2013

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