0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-11 06:28:55 +02:00

ircd::http: Parse the HTTP/1.1 Upgrade header.

This commit is contained in:
Jason Volk 2019-05-30 21:48:40 -07:00
parent 65fcc17148
commit fceea7b770
2 changed files with 3 additions and 0 deletions

View file

@ -229,6 +229,7 @@ struct ircd::http::request::head
string_view connection;
string_view content_type;
string_view user_agent;
string_view upgrade;
size_t content_length {0};
string_view uri; // full view of (path, query, fragmet)

View file

@ -317,6 +317,8 @@ ircd::http::request::head::head(parse::capstan &pc,
this->content_type = h.second;
else if(iequals(h.first, "user-agent"_sv))
this->user_agent = h.second;
else if(iequals(h.first, "upgrade"_sv))
this->upgrade = h.second;
if(c)
c(h);