This PR is roughly similar to #10190 and removes another generic parameter
Ideally we'd only pass in a Uri, but since we're using the RequestLog we still need to pass in the full Parts struct.
Previously we were compiling two variants of this function, one for Parts and one for Request, although on…
Our search endpoint supports having multiple ids[] query parameters defined, but the way we generate our pagination fields only considered the last such query parameter until now. This PR fixes the code to include all query parameters …
This PR implements the basic infrastructure to have an experimental, best-effort, automatically generated Op…
This makes it a bit more visible when buttons are disabled.
9bbea928ba2c66247fa64e6474f371ac3d57d48c introduced an important! marker, but missed that this was somewhat incompatible with the disabled state. This commit fixes it by also using important! for the disabled state. Clearly not a goo…
This partially implements step 2 of https://github.com/rust-lang/crates.io/issues/9352. The missing piece after this PR is a "Delete" button in the crate settings tab, since the new route is currently only reachable by typing it directly…
DELETE endpoints are supposed to return "204 No Content" upon successful deletion, unless the response contains an entity, which is not the case here.
see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE#successfully…
This reverts commit 4f55cbedd87b9178ef77c03eab6c21c7700c48f5.
Related:
These two don't appear to be needed anymore since they have been replaced by explicit error handling.
In https://github.com/rust-lang/crates.io/pull/7715 we implemented a middleware that ensured 200 OK response status codes for all API endpoints that are relevant for cargo (see https://doc.rust-lang.org/cargo/reference/registry-web-api…
well… it's still 200 OK due to the cargo rewrite middleware, but it would be 400 if that wasn't there…
previously this was converted to an internal server error, but since it's not the server's fault if faulty data is passed in …
This also means we don't need to use Handle::current().block_on() here anymore :)
At this point non-canonical downloads are responded to with a 404 error, so we might as well rely on the query failing to accomplish that. We unfortunately still need the query for download counting for now, but that will hopefully be re…
The NonCanonicalDownload struct was useful when we had a custom error message, but as this is no longer the case we don't need this anymore.
I wanted to add Debug impls for all of the structs that implement the new Email trait, but then I saw that some of them contain sensitive information. This PR replaces those fields with secrecy::SecretString types to ensure that th…
Unfortunately lettre uses different error types for all the transports, but that doesn't mean we need to follow that example. This PR merges the three variants into one using anyhow::Error, since we don't really care about the specif…
These appear to be unused and prevent us from using SecretString inside the struct
This does not appear to be used for anything… 🤷♂️
Previously we implemented new email variants by adding another method to the Emails struct, which then internally called self.send(...).
This PR explores a different implementation where each email variant is represented by its ow…
We've had this enabled for about a month now so its time to remove the feature flag.