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

crates-io: Add support for other 2xx HTTP status codes #13158

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 12, 2023

Replying with 201 Created of 202 Accepted should not result in showing errors.

Related:

Replying with `201 Created` of `202 Accepted` should not result in showing errors.
@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2023

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-interacts-with-crates.io Area: interaction with registries S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2023
@epage
Copy link
Contributor

epage commented Dec 12, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 12, 2023

📌 Commit 32d4c0f has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2023
@bors
Copy link
Collaborator

bors commented Dec 12, 2023

⌛ Testing commit 32d4c0f with merge 1aa9df1...

@bors
Copy link
Collaborator

bors commented Dec 12, 2023

☀️ Test successful - checks-actions
Approved by: epage
Pushing 1aa9df1 to master...

@bors bors merged commit 1aa9df1 into rust-lang:master Dec 12, 2023
20 checks passed
@ehuss
Copy link
Contributor

ehuss commented Dec 12, 2023

I'm a little concerned about this change. We currently document that only 200 is a valid return code. Can we follow up with updating the documentation to make that clearer?

Also, just to verify, are all 2xx responses really success? I see some of them are kinda weird, like 204 No Content. I suppose that one is fine since cargo seems to mostly ignore the response. I'm just looking at wikipedia, and I'm not sure if there are certain kinds of responses that aren't really success.

@Turbo87 Turbo87 deleted the crates-io-status-codes branch December 12, 2023 16:31
@Turbo87
Copy link
Member Author

Turbo87 commented Dec 12, 2023

Also, just to verify, are all 2xx responses really success?

that is my understanding and https://docs.rs/http/latest/src/http/status.rs.html#177-181 seems to confirm it

We currently document that only 200 is a valid return code. Can we follow up with updating the documentation to make that clearer?

sure! can you link me to the docs that you're referring to? :)

@epage
Copy link
Contributor

epage commented Dec 12, 2023

See https://doc.rust-lang.org/cargo/reference/registry-web-api.html#web-api

@weihanglo
Copy link
Member

Also, just to verify, are all 2xx responses really success?

Yes. See https://datatracker.ietf.org/doc/html/rfc7231#section-6.3 and https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses.

bors added a commit that referenced this pull request Dec 12, 2023
doc/registry-web-api: Adjust success response code documentation

see #13158 :)
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 12, 2023
Update cargo

20 commits in 9787229614b27854cf73d57ffae430d7c1e6caa4..1aa9df1a5be205cce621f0bc0ea6062a5e22a98c
2023-12-06 02:29:23 +0000 to 2023-12-12 14:52:31 +0000
- crates-io: Add support for other 2xx HTTP status codes (rust-lang/cargo#13158)
- Remove the deleted feature test_2018_feature from the test (rust-lang/cargo#13156)
- refactor(schema): Remove reliance on cargo types (rust-lang/cargo#13154)
- fix(toml)!: Disallow `[lints]` in virtual workspaces (rust-lang/cargo#13155)
- Limit exported-private-dependencies lints to libraries (rust-lang/cargo#13135)
- chore: update to gix-index@0.27.1 (rust-lang/cargo#13148)
- Update curl-sys to bring in curl 8.5.0 (rust-lang/cargo#13147)
- chore: downgrade to openssl v1.1.1 (rust-lang/cargo#13144)
- fix: explicitly remap current dir by using `.` (rust-lang/cargo#13114)
- Don't rely on mtime to test changes (rust-lang/cargo#13143)
- refactor: Pull PackageIdSpec into schema (rust-lang/cargo#13128)
- fix: Print rustc messages colored on wincon (rust-lang/cargo#13140)
- Add a windows manifest file (rust-lang/cargo#13131)
- Avoid writing CACHEDIR.TAG if it already exists (rust-lang/cargo#13132)
- re-enable flaky tests thanks to update to `gix-config`. (rust-lang/cargo#11821) (rust-lang/cargo#13130)
- fix bash completion in directory with spaces (rust-lang/cargo#13126)
- test: re-ignore git auth tests for gitoxide (rust-lang/cargo#13129)
- fix(toml): Disallow inheriting of dependency public status (rust-lang/cargo#13125)
- re-enable previously disabled tests with Windows-specific fix (rust-lang/cargo#13117)
- refactor: Clarify PackageId constructor names (rust-lang/cargo#13123)
@rustbot rustbot added this to the 1.76.0 milestone Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interacts-with-crates.io Area: interaction with registries S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants