Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

@SebC99
Copy link

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
Copy link
Author

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?

@wclr
Copy link

wclr commented 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.

@umutm
Copy link

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.

@cyjake
Copy link

cyjake commented Jul 30, 2013

any update on this?

@mikeal
Copy link
Member

mikeal commented Jul 30, 2013

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

@SebC99
Copy link
Author

SebC99 commented Aug 3, 2013

in my case, it does!
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants