Skip to content

Commit

Permalink
use get_request
Browse files Browse the repository at this point in the history
  • Loading branch information
bakins committed Apr 13, 2012
1 parent 373d31a commit f25fe97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ngx_http_lua_test_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ ngx_module_t ngx_http_lua_test_module = {
static int get_uri(lua_State * L)
{
ngx_http_request_t *r;
lua_getglobal(L, GLOBALS_SYMBOL_REQUEST);
r = lua_touserdata(L, -1);
lua_pop(L, 1);
lua_pushlstring(L, r->uri.data, r->uri.len);

r = ngx_http_lua_get_request(L);
lua_pushlstring(L, (const char *)r->uri.data, r->uri.len);

return 1;
}

Expand Down

0 comments on commit f25fe97

Please sign in to comment.