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

Response: Allow manual handling of Range requests #175

Merged
merged 1 commit into from Aug 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/response.rs
Expand Up @@ -15,9 +15,7 @@ use std::str::FromStr;
/// Some headers cannot be changed. Trying to define the value
/// of one of these will have no effect:
///
/// - `Accept-Ranges`
/// - `Connection`
/// - `Content-Range`
/// - `Trailer`
/// - `Transfer-Encoding`
/// - `Upgrade`
Expand Down Expand Up @@ -240,9 +238,7 @@ where
let header = header.into();

// ignoring forbidden headers
if header.field.equiv(&"Accept-Ranges")
|| header.field.equiv(&"Connection")
|| header.field.equiv(&"Content-Range")
if header.field.equiv(&"Connection")
|| header.field.equiv(&"Trailer")
|| header.field.equiv(&"Transfer-Encoding")
|| header.field.equiv(&"Upgrade")
Expand Down