Skip to content

Commit

Permalink
Merge pull request #175 from rawler/manual-range-support
Browse files Browse the repository at this point in the history
Response: Allow manual handling of Range requests
  • Loading branch information
rawler committed Aug 31, 2020
2 parents f4da4cd + 8792f53 commit 079d300
Showing 1 changed file with 1 addition and 5 deletions.
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

0 comments on commit 079d300

Please sign in to comment.