Skip to content

Subrequest streaming API #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reverted unnecessary changes.
  • Loading branch information
aviram committed Oct 3, 2013
commit e9e1dec69b88803a0080cbdbcb28151e31674fd9
23 changes: 8 additions & 15 deletions src/ngx_http_lua_headers.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,27 +574,21 @@ ngx_http_lua_ngx_req_header_clear(lua_State *L)
{
ngx_uint_t n;
n = lua_gettop(L);
if ((n != 1) && (n != 2)) {
return luaL_error(L, "expecting one or two arguments, but seen %d",
if (lua_gettop(L) != 1) {
return luaL_error(L, "expecting one arguments, but seen %d",
lua_gettop(L));
}

if (n == 2) {
lua_pushnil(L);
/* Top element is now 3, replace it with element 3 */
lua_insert(L, 2);
} else {
lua_pushnil(L);
}

lua_pushnil(L);

return ngx_http_lua_ngx_req_header_set_helper(L);
}


static int
ngx_http_lua_ngx_req_header_set(lua_State *L)
{
if ((lua_gettop(L) != 2) && (lua_gettop(L) != 3)) {
if (lua_gettop(L) != 2) {
return luaL_error(L, "expecting two arguments, but seen %d",
lua_gettop(L));
}
Expand Down Expand Up @@ -632,10 +626,9 @@ ngx_http_lua_ngx_req_header_set_helper(lua_State *L)

#if 0
/* replace "_" with "-" */
for (i = 0; i < len; i++) {
if (p[i] == '_') {
p[i] = '-';
}
for (i = 0; i < len; i++) {
if (p[i] == '_') {
p[i] = '-';
}
}
#endif
Expand Down