diff options
| author | Dan Engelbrecht <[email protected]> | 2023-04-26 14:43:55 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-26 14:43:55 +0200 |
| commit | 363e0f92c2c29c18dc45a3889c2f5ee182d14fa2 (patch) | |
| tree | 22bbbb35d271061090f3e9ea75fb1d71f8fb82f5 /zenhttp/httpsys.cpp | |
| parent | 0.2.6 (diff) | |
| download | zen-363e0f92c2c29c18dc45a3889c2f5ee182d14fa2.tar.xz zen-363e0f92c2c29c18dc45a3889c2f5ee182d14fa2.zip | |
only strip accept type suffix if it can be parsed to a known type (#258)
* only strip accept type suffix if it can be parsed to a known type
* changelog
Diffstat (limited to 'zenhttp/httpsys.cpp')
| -rw-r--r-- | zenhttp/httpsys.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zenhttp/httpsys.cpp b/zenhttp/httpsys.cpp index 0f4fe0a6d..c733d618d 100644 --- a/zenhttp/httpsys.cpp +++ b/zenhttp/httpsys.cpp @@ -1247,9 +1247,12 @@ HttpSysServerRequest::HttpSysServerRequest(HttpSysTransaction& Tx, HttpService& if (LastDotIndex != std::string_view::npos) { UriSuffix8.remove_prefix(LastDotIndex + 1); - m_Uri.remove_suffix(UriSuffix8.size() + 1); AcceptContentType = ParseContentType(UriSuffix8); + if (AcceptContentType != HttpContentType::kUnknownContentType) + { + m_Uri.remove_suffix(UriSuffix8.size() + 1); + } } } else |