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

Fixes error messages in Content-Type and Transfer-Encoding negotiation #354

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl Accept {
}
}

let mut err = Error::new_adhoc("No suitable ContentEncoding found");
let mut err = Error::new_adhoc("No suitable Content-Type found");
err.set_status(StatusCode::NotAcceptable);
Err(err)
}
Expand Down
4 changes: 2 additions & 2 deletions src/content/accept_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl AcceptEncoding {
sort_by_weight(&mut self.entries);
}

/// Determine the most suitable `Content-Type` encoding.
/// Determine the most suitable `Content-Encoding` encoding.
///
/// # Errors
///
Expand All @@ -133,7 +133,7 @@ impl AcceptEncoding {
}
}

let mut err = Error::new_adhoc("No suitable ContentEncoding found");
let mut err = Error::new_adhoc("No suitable Content-Encoding found");
err.set_status(StatusCode::NotAcceptable);
Err(err)
}
Expand Down
4 changes: 2 additions & 2 deletions src/transfer/te.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl TE {
sort_by_weight(&mut self.entries);
}

/// Determine the most suitable `Content-Type` encoding.
/// Determine the most suitable `Transfer-Encoding` encoding.
///
/// # Errors
///
Expand All @@ -131,7 +131,7 @@ impl TE {
}
}

let mut err = Error::new_adhoc("No suitable ContentEncoding found");
let mut err = Error::new_adhoc("No suitable Transfer-Encoding found");
err.set_status(StatusCode::NotAcceptable);
Err(err)
}
Expand Down