[core,gateway] fix http_request_write

ensure the stream is big enough to hold the data
This commit is contained in:
Armin Novak 2023-04-04 14:35:40 +02:00 committed by Martin Fleisz
parent 767818e97e
commit 14fd94a38c
1 changed files with 3 additions and 1 deletions

View File

@ -519,7 +519,9 @@ wStream* http_request_write(HttpContext* context, HttpRequest* request)
goto fail;
}
Stream_Write(s, "\r\n", 2);
if (!http_encode_print(s, "\r\n"))
goto fail;
Stream_SealLength(s);
return s;
fail: