-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Bug]: redirect in route.fetch may jump to a wrong url #30903
Comments
The issue seems related to nodejs/node#17390 (comment) where the
Since all browsers seem to support UTF-8, we should do that as well. Will evaluate with the team if we should post-process the headers and try to parse them as UTF-8 as well. |
@mxschmitt another bug maybe not relevant but still about route.fetch in my test:
the request of 'search?search_word=%E3%83%9E' is redirected to 'search?category=&search_word=%C3%A3%C2%83%C2%9E' in the route.fetch() |
This is expected as of today. Since you do Does this create any issues for you? |
I want to get the redirects information in the route.fetch.Is there a way like response.history of python requests module to catch it? |
There is not as of today. Feel free to file a separate feature request if you need it. |
Version
1.43.0
Steps to reproduce
Example steps (replace with your own):
Expected behavior
I expect 'https://www.suruga-ya.jp/search?search_word=%E3%83%9E' will jump to ' https://www.suruga-ya.jp/search?category=&search_word=%E3%83%9E'
And if I set a route function:
def route_continue(route): return route.continue_()
or without setting any route function,I can get the proper behavior
Actual behavior
however,if I set a route function:
def route_fetch(route): return route.fulfill(response=route.fetch(max_redirects=0))
It will jump to a wrong url 'https://www.suruga-ya.jp/search?category=&search_word=%C3%A3%C2%83%C2%9E'
Additional context
I think the error may stem from the url parse of response.headers['location'] in route.fetch
Environment
The text was updated successfully, but these errors were encountered: