summaryrefslogtreecommitdiff
path: root/methods/basehttp.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-06-28 20:59:27 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2021-02-04 11:00:00 +0100
commit3e53dbbe758a4e2da378ebf0296d8105d4a5804c (patch)
treef5e276a1e180e8f12121fa52e3c4653c2af7fc53 /methods/basehttp.h
parent96dc40b19623621a9cc2c5541fb3adbbceb553b1 (diff)
Ensure HTTP status code text has sensible content
We use the code in error messages, so at least for that edgecase we should ensure that it has sensible content. Note that the acquire system aborts on non-sensible message content in SendMessage, so you can't really exploit this.
Diffstat (limited to 'methods/basehttp.h')
-rw-r--r--methods/basehttp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/methods/basehttp.h b/methods/basehttp.h
index 62c9963ea..c0d14d854 100644
--- a/methods/basehttp.h
+++ b/methods/basehttp.h
@@ -60,7 +60,7 @@ struct RequestState
bool AddPartialFileToHashes(FileFd &File);
RequestState(BaseHttpMethod * const Owner, ServerState * const Server) :
- Owner(Owner), Server(Server) { time(&Date); }
+ Owner(Owner), Server(Server) { time(&Date); Code[0] = '\0'; }
};
struct ServerState
{