You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I request an url with a 302 redirection, and a content-length=0 header. With followRedirect:true and jar:false, request manages to get to the redirection, but keep the content-length=0 header (whereas the server response doesn't include a content-length).
The result is an undefined body instead of the real body.
I guess in that case the content-length header should be undefined or removed, to match the final redirection headers.
I check into request code, and I saw that it deletes content-length on redirect.
So I check my version with npm, and I was on 2.12.0
I tried to update with a npm update request but it kept me the 2.12 so I forced the npm install [email protected] and now it's perfectly working.
I request an url with a 302 redirection, and a content-length=0 header. With followRedirect:true and jar:false, request manages to get to the redirection, but keep the content-length=0 header (whereas the server response doesn't include a content-length).
The result is an undefined body instead of the real body.
I guess in that case the content-length header should be undefined or removed, to match the final redirection headers.
If you want to test, here is the requested url (it's a result from google Shopping API) : http://eultech.fnac.com/dynclick/fnac/?etf-publisher=GoogleProducts&etf-name=GoogleProducts_micros&etf-prdref=4245347&eseg-name=referentiel_produit&eseg-item=Fnac&eurl=http://www.fnac.com/Apple-MacBook-Air-Core-i5-a-1-7-GHz-11-6-LED-64-Go-Nouveau/a4245347/w-4?oref=00000000-0000-0000-0000-000000000000&Origin=CMP_GOOGLE_PS_TEK
The text was updated successfully, but these errors were encountered: