aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
Diffstat (limited to 'zencore')
-rw-r--r--zencore/httpserver.cpp3
-rw-r--r--zencore/include/zencore/httpserver.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/zencore/httpserver.cpp b/zencore/httpserver.cpp
index d7e6a875f..2bfa25dea 100644
--- a/zencore/httpserver.cpp
+++ b/zencore/httpserver.cpp
@@ -1160,6 +1160,9 @@ public:
const HTTP_KNOWN_HEADER& CtHdr = HttpRequestPtr->Headers.KnownHeaders[HttpHeaderContentType];
m_ContentType = MapContentType({CtHdr.pRawValue, CtHdr.RawValueLength});
+
+ const HTTP_KNOWN_HEADER& AcceptHdr = HttpRequestPtr->Headers.KnownHeaders[HttpHeaderAccept];
+ m_AcceptType = MapContentType({AcceptHdr.pRawValue, AcceptHdr.RawValueLength});
}
~HttpSysServerRequest() {}
diff --git a/zencore/include/zencore/httpserver.h b/zencore/include/zencore/httpserver.h
index d4d9e21e0..493ea63e9 100644
--- a/zencore/include/zencore/httpserver.h
+++ b/zencore/include/zencore/httpserver.h
@@ -206,6 +206,7 @@ public:
inline HttpVerb RequestVerb() const { return m_Verb; }
inline HttpContentType RequestContentType() { return m_ContentType; }
+ inline HttpContentType AcceptContentType() { return m_AcceptType; }
const char* HeaderAccept() const;
const char* HeaderAcceptEncoding() const;
@@ -252,6 +253,7 @@ protected:
HttpVerb m_Verb = HttpVerb::kGet;
uint64_t m_ContentLength = ~0ull;
HttpContentType m_ContentType = HttpContentType::kBinary;
+ HttpContentType m_AcceptType = HttpContentType::kUnknownContentType;
ExtendableStringBuilder<256> m_Uri;
ExtendableStringBuilder<256> m_QueryString;
};