Welcome! Log In Create A New Profile

Advanced

Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

All files from this thread

File Name File Size   Posted by Date  
96 bytes open | download Wendal Chen 03/17/2011 Read message
Wendal Chen
March 15, 2011 03:30AM
Hi,

Lua-nginx-module 0.16RC2
Nginx 0.8.54

my nginx.conf :
location =/down2 {
content_by_lua_file "conf/lua_test.lua";
}

and lua_test.lua:
local res = ngx.location.capture('/somepath')
-- do something for res

ngx.exec("/down/pathXXX") -- File content is "ABC"

then , If I use command:
curl localhost/down2
#print out ABC

if I use Firefox to visit URL "http://localhost/down/pathXXX" and then "ABC"
show out.

BUT , if I use ab to test it :
ab -v http://localhost/down2
#Fail with timeout

Log of ab:

Benchmarking localhost (be patient)...INFO: POST header ==
---
GET /down2 HTTP/1.0
Host: localhost
User-Agent: ApacheBench/2.3
Accept: */*


---
LOG: header received:
HTTP/1.1 200 OK
Server: nginx/0.8.54
Date: Tue, 15 Mar 2011 07:22:30 GMT
Content-Type: text/plain
Content-Length: 10
Last-Modified: Fri, 11 Mar 2011 09:32:28 GMT
Connection: close
Accept-Ranges: bytes

I am Best

LOG: Response code = 200
apr_poll: The timeout specified has expired (70007)

I think lua-nginx-module lose some 0x0A 0x0D in resp.

Thanks,
Wendal Chen
http://myblog.sunfarms.net
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

Wendal Chen March 15, 2011 03:30AM

Re: Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

agentzh March 15, 2011 06:42AM

Re: Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

Wendal Chen March 15, 2011 07:48AM

Re: Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

agentzh March 17, 2011 02:48AM

Re: Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec Attachments

Wendal Chen March 17, 2011 07:46AM

Re: Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

agentzh April 06, 2011 11:16PM

Re: Issue in Lua-nginx-module when use both ngx.location.capture and ngx.exec

Wendal Chen April 07, 2011 03:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 230
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready