summaryrefslogtreecommitdiff
path: root/methods/basehttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/basehttp.cc')
-rw-r--r--methods/basehttp.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index c88e62f46..d7d9bccd0 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -175,7 +175,11 @@ bool RequestState::HeaderLine(string const &Line) /*{{{*/
return true;
}
- if (stringcasecmp(Tag,"Content-Range:") == 0)
+ // The Content-Range field only has a meaning in HTTP/1.1 for the
+ // 206 (Partial Content) and 416 (Range Not Satisfiable) responses
+ // according to RFC7233 "Range Requests", ยง4.2, so only consider it
+ // for such responses.
+ if ((Result == 416 || Result == 206) && stringcasecmp(Tag,"Content-Range:") == 0)
{
HaveContent = true;