Fix a bug
This commit is contained in:
parent
867785422c
commit
6a9578cc0b
2 changed files with 30 additions and 11 deletions
|
|
@ -14,7 +14,7 @@ use std::net::SocketAddr;
|
|||
use std::str::FromStr;
|
||||
use std::time::Duration;
|
||||
use tokio::io::AsyncSeekExt;
|
||||
use tracing::{debug, info};
|
||||
use tracing::{debug, info, trace};
|
||||
|
||||
use axum::Router;
|
||||
|
||||
|
|
@ -167,6 +167,9 @@ impl HttpApi {
|
|||
let mut output_headers = HeaderMap::new();
|
||||
output_headers.insert("Accept-Ranges", HeaderValue::from_static("bytes"));
|
||||
|
||||
let range_header = headers.get(http::header::RANGE);
|
||||
trace!(torrent_id=idx, file_id=file_id, range=?range_header, "request for HTTP stream");
|
||||
|
||||
if let Some(range) = headers.get(http::header::RANGE) {
|
||||
let offset: Option<u64> = range
|
||||
.to_str()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue