Skip to content

Improve handling of urls missing / #584

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

Merged
merged 3 commits into from
Feb 2, 2020

Conversation

Zexbe
Copy link
Contributor

@Zexbe Zexbe commented Feb 2, 2020

Improve handling of urls missing /
Ex: http://127.0.0.1:3000/hyper/0.13.2/hyper/client/conn

Fix #288
Previous Attempt: #582

@jyn514 jyn514 self-assigned this Feb 2, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I pointed out a bunch of small typos, you may want to make 1 commit fixing them locally instead of 5 in the browser, but I don't mind either way.

Thank you for making the changes smaller this time :)

@@ -488,7 +504,9 @@ mod test {
assert_success(base, web)?;
assert_redirect("/dummy/0.3.0/x86_64-unknown-linux-gnu/dummy/", base, web)?;
assert_redirect("/dummy/0.3.0/x86_64-unknown-linux-gnu/all.html", "/dummy/0.3.0/all.html", web)?;
assert_redirect("/dummy/0.3.0/", base, web)
assert_redirect("/dummy/0.3.0/", base, web)?;
assert_redirect("/dummy/0.3.0/index.html",base, web)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I forgot about this when I added the test the first time.

@jyn514
Copy link
Member

jyn514 commented Feb 2, 2020

This is /hyper/0.13.2/hyper/client/conn locally.

image

@jyn514 jyn514 merged commit 4abae1a into rust-lang:master Feb 2, 2020
@Zexbe Zexbe deleted the improve-link-fallback2 branch February 2, 2020 19:20
@jyn514 jyn514 mentioned this pull request Feb 11, 2020
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Try to serve index.html if link points to directory
2 participants