chaoslawful/lua-nginx-module — Issue #71: subrequest method is not working
Author: Vittly
Created: 2011-11-26 13:47:18+00:00
State: open

Hi! I am using lua_nginx r34, nginx 1.0.10 with openssl,pcre 8.2 (enabled utf8 and jit) and when I am triing to do "location.capture" specifying method = ngx.HTTP_PUT, I'll get the method of original request.

Example:

location =/a {
content_by_lua "if ngx.var.request_method == 'POST' then ngx.location.capture('/b') end";
}
location =/b {
ngx.log(ngx.ERR,ngx.var.request_method)
}

If I write capture('/b',{method = ngx.HTTP_PUT} or POST or whatever I still got POST

If it looks like:

lcoation =/a {
content_by_lua "if ngx.var.request_method == 'GET' then ngx.location.capture('/b') end";
}
location =/b {
ngx.log(ngx.ERR,ngx.var.request_method)
}

I would get everytime 'GET' in my log.

Thnx for great job! Lua nginx rocks