diff --git a/src/server/request_context.cpp b/src/server/request_context.cpp index 04ece7c5e..9ed28be84 100644 --- a/src/server/request_context.cpp +++ b/src/server/request_context.cpp @@ -126,7 +126,7 @@ void RequestContext::print_debug_info() const { printf("full_url: %s\n", full_url.c_str()); printf("url : %s\n", url.c_str()); printf("acceptEncodingDeflate : %d\n", acceptEncodingDeflate); - printf("has_range : %d\n", has_range()); + printf("has_range : %d\n", byteRange_.kind() != ByteRange::NONE); printf("is_valid_url : %d\n", is_valid_url()); printf(".............\n"); } @@ -168,10 +168,6 @@ bool RequestContext::is_valid_url() const { return !url.empty(); } -bool RequestContext::has_range() const { - return byteRange_.kind() == ByteRange::PARSED; -} - ByteRange RequestContext::get_range() const { return byteRange_; } diff --git a/src/server/request_context.h b/src/server/request_context.h index 3256e30e5..4860fcf6e 100644 --- a/src/server/request_context.h +++ b/src/server/request_context.h @@ -80,7 +80,6 @@ class RequestContext { std::string get_url_part(int part) const; std::string get_full_url() const; - bool has_range() const; ByteRange get_range() const; bool can_compress() const { return acceptEncodingDeflate; }