summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
Diffstat (limited to 'methods')
-rw-r--r--methods/server.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/methods/server.cc b/methods/server.cc
index 0408dddfd..164a98166 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -180,7 +180,11 @@ bool ServerState::HeaderLine(string 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;