summaryrefslogtreecommitdiff
path: root/methods/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/server.cc')
-rw-r--r--methods/server.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/methods/server.cc b/methods/server.cc
index d0b6ef3d7..aa1ee4754 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -227,6 +227,15 @@ bool ServerState::HeaderLine(string Line)
return true;
}
+ if (stringcasecmp(Tag, "Accept-Ranges:") == 0)
+ {
+ std::string ranges = ',' + Val + ',';
+ ranges.erase(std::remove(ranges.begin(), ranges.end(), ' '), ranges.end());
+ if (ranges.find(",bytes,") == std::string::npos)
+ RangesAllowed = false;
+ return true;
+ }
+
return true;
}
/*}}}*/
@@ -252,6 +261,7 @@ void ServerState::Reset(bool const Everything) /*{{{*/
if (Everything)
{
Persistent = false; Pipeline = false; PipelineAllowed = true;
+ RangesAllowed = true;
}
}
/*}}}*/