We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c5e5b9 commit f2e849aCopy full SHA for f2e849a
src/ngx_http_lua_headers.c
@@ -589,15 +589,9 @@ ngx_http_lua_ngx_req_header_clear(lua_State *L)
589
}
590
591
if (n == 2) {
592
- u_char *p;
593
- size_t len;
594
- int replace_underscores = 1;
595
- p = (u_char *) luaL_checklstring(L, 1, &len);
596
- replace_underscores = lua_toboolean(L, 2);
597
- lua_pop(L, 2);
598
- lua_pushlstring(L, (char *) p, len);
599
lua_pushnil(L);
600
- lua_pushboolean(L, replace_underscores);
+ /* Top element is now 3, replace it with element 3 */
+ lua_insert(L, 2);
601
} else {
602
603
0 commit comments