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

Navigating forward/backward does not use the redirected url #4290

Open
mukilan opened this issue Dec 8, 2014 · 0 comments
Open

Navigating forward/backward does not use the redirected url #4290

mukilan opened this issue Dec 8, 2014 · 0 comments

Comments

@mukilan
Copy link
Contributor

@mukilan mukilan commented Dec 8, 2014

Steps to reproduce:
Set RUST_LOG=net

  1. Go to http://www.google.co.in
    Log:
DEBUG:net::resource_task: resource_task: loading url: http://www.google.co.in/
INFO:net::http_loader: requesting http://www.google.co.in/
INFO:net::http_loader: got HTTP response 200 OK, headers:
DEBUG:net::image_cache_task: image_cache_task: ended image decode for http://www.google.co.in/images/srpr/logo9w.png
INFO:net::http_loader: got HTTP response 200 OK, headers:
(truncated)
  1. Click on "About Google" link. The href of this link is ""http://www.google.co.in/intl/en/about.html"
    However it redirects to ""http://www.google.co.in/intl/en/about/" (no .html at the end)
    Log:
DEBUG:net::resource_task: resource_task: loading url: http://www.google.co.in/intl/en/about.html
INFO:net::http_loader: requesting http://www.google.co.in/intl/en/about.html
INFO:net::http_loader: got HTTP response 301 Moved Permanently, headers:
INFO:net::http_loader:  - Cache-Control: public, max-age=2592000
INFO:net::http_loader:  - Location: http://www.google.co.in/intl/en/about/
INFO:net::http_loader:  - Content-Type: text/html; charset=UTF-8
INFO:net::http_loader:  - X-Content-Type-Options: nosniff
INFO:net::http_loader:  - Expires: Wed, 07 Jan 2015 18:41:45 GMT
INFO:net::http_loader:  - Age: 10022
INFO:net::http_loader:  - Content-Length: 235
INFO:net::http_loader:  - Date: Mon, 08 Dec 2014 18:41:45 GMT
INFO:net::http_loader:  - Alternate-Protocol: 80:quic,p=0.02
INFO:net::http_loader:  - Server: sffe
INFO:net::http_loader:  - X-XSS-Protection: 1; mode=block
INFO:net::http_loader: redirecting to http://www.google.co.in/intl/en/about/
INFO:net::http_loader: requesting http://www.google.co.in/intl/en/about/
INFO:net::http_loader: got HTTP response 200 OK, headers:
(truncated)
  1. Press backspace to go back
  2. Press shift+backspace to go forward.
    This time Servo loads the about page again from "http://www.google.co.in/intl/en/about.html", gets redirected to "http://www.google.co.in/intl/en/about/"
DEBUG:net::resource_task: resource_task: loading url: http://www.google.co.in/intl/en/about.html
INFO:net::http_loader: requesting http://www.google.co.in/intl/en/about.html
INFO:net::http_loader: got HTTP response 301 Moved Permanently, headers:
INFO:net::http_loader:  - Date: Mon, 08 Dec 2014 18:41:45 GMT
INFO:net::http_loader:  - Alternate-Protocol: 80:quic,p=0.02
INFO:net::http_loader:  - Location: http://www.google.co.in/intl/en/about/
INFO:net::http_loader:  - Age: 10036
INFO:net::http_loader:  - X-Content-Type-Options: nosniff
INFO:net::http_loader:  - Expires: Wed, 07 Jan 2015 18:41:45 GMT
INFO:net::http_loader:  - Content-Length: 235
INFO:net::http_loader:  - X-XSS-Protection: 1; mode=block
INFO:net::http_loader:  - Cache-Control: public, max-age=2592000
INFO:net::http_loader:  - Content-Type: text/html; charset=UTF-8
INFO:net::http_loader:  - Server: sffe
INFO:net::http_loader: redirecting to http://www.google.co.in/intl/en/about/
INFO:net::http_loader: requesting http://www.google.co.in/intl/en/about/
INFO:net::http_loader: got HTTP response 200 OK, headers:
(truncated)

This happens because when we navigate forward/backward, we use the load_data that was created with the original url and is never updated again.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.