mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::http: Increase buffer size; report proper error for exceeding.
This commit is contained in:
parent
6fe770b4bf
commit
c9b1b37505
1 changed files with 7 additions and 1 deletions
|
@ -586,9 +586,15 @@ void
|
|||
ircd::http::assign(response::head &head,
|
||||
const header &header)
|
||||
{
|
||||
char buf[64];
|
||||
char buf[96];
|
||||
const auto &[key_, val] {header};
|
||||
assert(size(key_) <= sizeof(buf));
|
||||
if(unlikely(size(key_) > sizeof(buf)))
|
||||
throw error
|
||||
{
|
||||
REQUEST_HEADER_FIELDS_TOO_LARGE
|
||||
};
|
||||
|
||||
const auto &key
|
||||
{
|
||||
tolower(buf, key_)
|
||||
|
|
Loading…
Reference in a new issue