0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd::http: Parse content_type convenience reference in response::head.

This commit is contained in:
Jason Volk 2018-02-26 04:00:36 -08:00
parent 8f9a4aad7d
commit 64a77e280d
2 changed files with 4 additions and 0 deletions

View file

@ -343,6 +343,7 @@ struct ircd::http::response::head
:line::response
{
size_t content_length {0};
string_view content_type;
string_view transfer_encoding;
string_view server;

View file

@ -450,6 +450,9 @@ ircd::http::response::head::head(parse::capstan &pc,
if(iequals(h.first, "content-length"s))
this->content_length = parser.content_length(h.second);
else if(iequals(h.first, "content-type"s))
this->content_type = h.second;
else if(iequals(h.first, "transfer-encoding"s))
this->transfer_encoding = h.second;