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
First response contains status code equals to 301 (that means that we should redirect to URL from location header, but it contains encoded Russian letters: Сала��
Since this URL (http://www.tanitbar.ru/Сала��) doesn't exist, I'm getting 404 error
Expected Behavior
Expect to get html body of page, with status code equals to 200
Current Behavior
I'm getting 404 for now
Possible Solution
curl works fine and redirects to another URL after receiving 301 curl "http://www.tanitbar.ru/menu.aspx?cat=6" -L, (curl doesn't redirect by default, therefore we need to pass -L option)
I guess we should decode location header somehow before redirection (By the way I could not decode it by hand)
Context
Couldn't receive content of the page from JS.
Your Environment
software
version
request
^2.83.0
node
8.7.0
npm
5.4.2
Operating System
Linux, Ubuntu
Thanks in advance!
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Summary
Hi guys, I'm having trouble with sending request to URL which precedes redirection to another one after receiving
301
.Simplest Example to Reproduce
First response contains status code equals to 301 (that means that we should redirect to URL from
location
header, but it contains encoded Russian letters:Сала��
Since this URL (
http://www.tanitbar.ru/Сала��
) doesn't exist, I'm getting404
errorExpected Behavior
Expect to get html body of page, with status code equals to
200
Current Behavior
I'm getting
404
for nowPossible Solution
curl
works fine and redirects to another URL after receiving 301curl "http://www.tanitbar.ru/menu.aspx?cat=6" -L
, (curl doesn't redirect by default, therefore we need to pass-L
option)I guess we should decode location header somehow before redirection (By the way I could not decode it by hand)
Context
Couldn't receive content of the page from JS.
Your Environment
Thanks in advance!
The text was updated successfully, but these errors were encountered: