mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-08-14 23:50:45 +00:00
Be compliant with rfc7233 for sending a 206 response.
This commit is contained in:
parent
118c005d4d
commit
c3b78def59
1 changed files with 1 additions and 3 deletions
|
@ -245,8 +245,6 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
let has_range = query.has("range");
|
||||
|
||||
let qs = {
|
||||
let collected = query
|
||||
.into_pairs()
|
||||
|
@ -430,7 +428,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
|
|||
if let Some(mime_type) = mime_type {
|
||||
response.content_type(mime_type);
|
||||
}
|
||||
if has_range {
|
||||
if req.headers().contains_key("range") {
|
||||
response.status(StatusCode::PARTIAL_CONTENT);
|
||||
}
|
||||
let transformed_stream = UmpTransformStream::new(resp);
|
||||
|
|
Loading…
Reference in a new issue