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

Don't normalize URIs with no valid path #2246

Merged
merged 2 commits into from
Jun 5, 2021
Merged

Conversation

thalesfragoso
Copy link
Member

@thalesfragoso thalesfragoso commented Jun 3, 2021

PR Type

Bug Fix

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

During path normalization, we were transforming an empty path into /, which would create an invalid URI in the case where the original URI was in the authority form (no path nor scheme), which in turn would cause a panic because of an unwrap.

Closes #2240

@thalesfragoso thalesfragoso marked this pull request as ready for review June 3, 2021 16:52
@robjtede robjtede added A-web project: actix-web B-semver-patch labels Jun 3, 2021
Copy link
Member

@ibraheemdev ibraheemdev left a comment

Choose a reason for hiding this comment

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

A couple minor suggestions, but looks good 👍

@thalesfragoso
Copy link
Member Author

Updated and rebased, but really not sure what is happening in the macOS CI...

@robjtede robjtede merged commit b1e841f into actix:master Jun 5, 2021
@robjtede
Copy link
Member

robjtede commented Jun 5, 2021

Nice job, thanks for taking the time to work though it with me in chat and get this PR together 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web project: actix-web B-semver-patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in NormalizePath when presented Uri is in authority form
3 participants