diff options
Diffstat (limited to 'methods/server.cc')
-rw-r--r-- | methods/server.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/methods/server.cc b/methods/server.cc index e260708c5..cac77e24c 100644 --- a/methods/server.cc +++ b/methods/server.cc @@ -192,7 +192,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; |