Skip to content

Commit bab16f2

Browse files
committed
Remove redundant content-type check
1 parent 63175fb commit bab16f2

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

crates/uv-client/src/cached_client.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ use crate::{
2626
///
2727
/// Note: This consumes the response body, so it should only be called when there's an error status.
2828
async fn extract_problem_details(response: Response) -> Option<ProblemDetails> {
29-
// Check if the response has the RFC 9457 content type
30-
let content_type = response.headers().get("content-type")?.to_str().ok()?;
31-
32-
if !content_type.starts_with("application/problem+json") {
33-
return None;
34-
}
35-
3629
// Try to read the response body and parse it as problem details
3730
match response.bytes().await {
3831
Ok(bytes) => ProblemDetails::from_json(&bytes).ok(),

0 commit comments

Comments
 (0)