mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 10:20:29 +00:00
Limit redbean reason to 128 chars when set instead of reporting an error
This commit is contained in:
parent
8c535a0198
commit
7c012321d6
1 changed files with 1 additions and 1 deletions
|
@ -3143,7 +3143,7 @@ static int LuaRespond(lua_State *L, char *R(unsigned, const char *)) {
|
|||
luaheaderp = R(code, GetHttpReason(code));
|
||||
} else {
|
||||
reason = lua_tolstring(L, 2, &reasonlen);
|
||||
if (reasonlen < 128 && (p = EncodeHttpHeaderValue(reason, reasonlen, 0))) {
|
||||
if ((p = EncodeHttpHeaderValue(reason, MIN(reasonlen, 128), 0))) {
|
||||
luaheaderp = R(code, p);
|
||||
free(p);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue