Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
SebC99 opened this Issue · 6 comments

5 participants

@SebC99

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

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

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

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

any update on this?

@mikeal
Owner

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

@SebC99

in my case, it does!
thanks

@SebC99 SebC99 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.