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

Revert "Merge #1378" #1476

Merged
merged 1 commit into from
Aug 15, 2018
Merged

Revert "Merge #1378" #1476

merged 1 commit into from
Aug 15, 2018

Conversation

jtgeibel
Copy link
Member

This reverts commit ba6c689, reversing changes made to 9b4a92c.

This reverts the changes introduced in PR #1378. The deploy has already been rolled back and this will get master back into a clean state so that deploys can be made if other issues arise before this bug can be resolved. The code reverted by this PR was causing cargo publish to fail with a 404 error.

The issue appears to be triggered because cargo publish includes an additional / at the beginning of its route. It is possible that civet removes this automatically before it gets to conduit's routing logic, and that hyper leaves the extra / intact, causing the routing logic to fail to find the correct handler.

This reverts commit ba6c689, reversing
changes made to 9b4a92c.
@carols10cents
Copy link
Member

thank yoouuu!!!

bors: r+

bors-voyager bot added a commit that referenced this pull request Aug 15, 2018
1476: Revert "Merge #1378" r=carols10cents a=jtgeibel

This reverts commit ba6c689, reversing changes made to 9b4a92c.

This reverts the changes introduced in PR #1378.  The deploy has already been rolled back and this will get master back into a clean state so that deploys can be made if other issues arise before this bug can be resolved.  The code reverted by this PR was causing `cargo publish` to fail with a 404 error.

The issue appears to be triggered because `cargo publish` includes an additional `/` at the beginning of its route.  It is possible that civet removes this automatically before it gets to conduit's routing logic, and that hyper leaves the extra `/` intact, causing the routing logic to fail to find the correct handler.

Co-authored-by: Justin Geibel <[email protected]>
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Aug 15, 2018

Build succeeded

@bors-voyager bors-voyager bot merged commit 6f487d1 into rust-lang:master Aug 15, 2018
@jtgeibel jtgeibel deleted the revert-1378 branch September 19, 2018 03:13
@jtgeibel jtgeibel restored the revert-1378 branch September 19, 2018 03:14
@jtgeibel jtgeibel deleted the revert-1378 branch September 19, 2018 03:15
jtgeibel added a commit to jtgeibel/crates.io-index-1 that referenced this pull request Sep 21, 2018
While trying to migrate the crates.io backend over to `hyper`, we ran into the issue that cargo hits API endpoints with URLs like `https://crates.io//api/v1/crates/new` (`//` before `api`).  At the time, we rolled back the deploy and reverted the code in rust-lang/crates.io#1476 because it broke cargo API interactions.

By removing the trailing `/` in the configuration here, cargo clients will send a single `/` and we won't need special case handling on the backend.

I've looked though the history of `src/crates-io/lib.rs` in the `cargo` source, and as far back as rust-lang/cargo@9fba127 the code always appends `/api/v1` the the configured api URL.  This is included in the oldest git tag for cargo, `v0.0.1-pre`.
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.

2 participants