summaryrefslogtreecommitdiff
path: root/methods/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/server.cc')
-rw-r--r--methods/server.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/methods/server.cc b/methods/server.cc
index ef90c809c..90e83d1af 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -119,10 +119,10 @@ bool ServerState::HeaderLine(string Line)
string::size_type Pos2 = Pos;
while (Pos2 < Line.length() && isspace(Line[Pos2]) != 0)
Pos2++;
-
+
string Tag = string(Line,0,Pos);
string Val = string(Line,Pos2);
-
+
if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0)
{
// Evil servers return no version
@@ -159,14 +159,14 @@ bool ServerState::HeaderLine(string Line)
}
return true;
- }
-
+ }
+
if (stringcasecmp(Tag,"Content-Length:") == 0)
{
if (Encoding == Closes)
Encoding = Stream;
HaveContent = true;
-
+
// The length is already set from the Content-Range header
if (StartPos != 0)
return true;
@@ -184,7 +184,7 @@ bool ServerState::HeaderLine(string Line)
HaveContent = true;
return true;
}
-
+
if (stringcasecmp(Tag,"Content-Range:") == 0)
{
HaveContent = true;
@@ -201,12 +201,12 @@ bool ServerState::HeaderLine(string Line)
return _error->Error(_("This HTTP server has broken range support"));
return true;
}
-
+
if (stringcasecmp(Tag,"Transfer-Encoding:") == 0)
{
HaveContent = true;
if (stringcasecmp(Val,"chunked") == 0)
- Encoding = Chunked;
+ Encoding = Chunked;
return true;
}
@@ -218,7 +218,7 @@ bool ServerState::HeaderLine(string Line)
Persistent = true;
return true;
}
-
+
if (stringcasecmp(Tag,"Last-Modified:") == 0)
{
if (RFC1123StrToTime(Val.c_str(), Date) == false)
@@ -413,7 +413,7 @@ bool ServerMethod::Fetch(FetchItem *)
}
return true;
-};
+}
/*}}}*/
// ServerMethod::Loop - Main loop /*{{{*/
int ServerMethod::Loop()