aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpsys.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-10-15 16:04:56 +0200
committerMartin Ridgers <[email protected]>2021-10-15 16:04:56 +0200
commit402dfddf62d979319038801a926809e33839e096 (patch)
treee8a8e99c7f4718a5fcc363245cc19e16a41bea25 /zenhttp/httpsys.cpp
parentIf/def around Windows-only headers (diff)
parenthttpasio: Implemented support for specifying accept type via url suffix (diff)
downloadzen-402dfddf62d979319038801a926809e33839e096.tar.xz
zen-402dfddf62d979319038801a926809e33839e096.zip
Merged main
Diffstat (limited to 'zenhttp/httpsys.cpp')
-rw-r--r--zenhttp/httpsys.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/zenhttp/httpsys.cpp b/zenhttp/httpsys.cpp
index 91f7da35a..43dfe30d8 100644
--- a/zenhttp/httpsys.cpp
+++ b/zenhttp/httpsys.cpp
@@ -194,9 +194,11 @@ public:
HttpSysServerRequest(const HttpSysServerRequest&) = delete;
HttpSysServerRequest& operator=(const HttpSysServerRequest&) = delete;
- HttpSysTransaction& m_HttpTx;
- HttpSysRequestHandler* m_NextCompletionHandler = nullptr;
- IoBuffer m_PayloadBuffer;
+ HttpSysTransaction& m_HttpTx;
+ HttpSysRequestHandler* m_NextCompletionHandler = nullptr;
+ IoBuffer m_PayloadBuffer;
+ ExtendableStringBuilder<128> m_UriUtf8;
+ ExtendableStringBuilder<128> m_QueryStringUtf8;
};
/** HTTP transaction
@@ -1252,6 +1254,8 @@ HttpSysServerRequest::HttpSysServerRequest(HttpSysTransaction& Tx, HttpService&
m_UriUtf8.Reset();
}
+ m_Uri = std::string_view(m_UriUtf8);
+
if (uint16_t QueryStringLength = HttpRequestPtr->CookedUrl.QueryStringLength)
{
--QueryStringLength; // We skip the leading question mark
@@ -1263,6 +1267,7 @@ HttpSysServerRequest::HttpSysServerRequest(HttpSysTransaction& Tx, HttpService&
m_QueryStringUtf8.Reset();
}
+ m_QueryString = std::string_view(m_QueryStringUtf8);
m_Verb = TranslateHttpVerb(HttpRequestPtr->Verb);
m_ContentLength = GetContentLength(HttpRequestPtr);
m_ContentType = GetContentType(HttpRequestPtr);