-
Notifications
You must be signed in to change notification settings - Fork 96
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
Ignore querystrings #217
Ignore querystrings #217
Conversation
769ae5a
to
fb4bedb
Compare
Travis is failing on |
Thanks for contributing! I probably won't get a chance to review this for a day or two.
I just ran into the same problem with liquid. The CI code uses a fixed version of rustfmt which is easy to get out of sync with. https://github.com/cobalt-org/cobalt.rs/blob/master/ci/install.sh#L7 One option is to include updating the version of rustfmt as part of your change. I took the quick and dirty route in liquid and am using cargo to install rustfmt but that slows down the CI. The problem with that is that I want to be respectful of travis/appveyor providing these services for us. |
src/main.rs
Outdated
// find the path of the file in the local system | ||
// (this gets rid of the '/' in `p`, so the `join()` will not replace the | ||
// path) | ||
let path = PathBuf::from(dest).join(&req_path[1..]); | ||
let path = PathBuf::from(dest).join(&stripped_path[1..]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than split
/collect
, what if we
rfind
+truncate
rsplitn(2, "?").last().expect("always at least one element")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I'll have a look into this
So what to do about the CI issue. Personally, I'd recommend stripping off the last of your commits and rebasing against upstream master. At that point it should be resolved if you use the same version of rust fmt (0.8.3 I believe). This will get the CI passing and will keep history clean. I know "rebase + push -f" is generally considered bad form but no else should really be broken because of it and not sure what else would be recommended to do in this case. If you don't feel up to that, we could probably commit as is (once the issue above gets cleaned up) or I could clone your branch and clean it up if you wish. |
291b79e
to
58ee7f6
Compare
58ee7f6
to
a39d6ed
Compare
I've rebased and deleted the whitespace that |
I've removed the |
35d24ef
to
15b7e57
Compare
Looks good. Once the clippy issue is resolved, this is good to go in. |
Fix for #207 - strips querystrings from urls when serving files locally