Hi agentzh,
Here is the minimal configuration example that should help reproduce the bug, nginx version: nginx/1.4.5 built by gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1)
configure arguments: --prefix=../httpd --add-module=/home/pongo/src/ngx_devel_kit-0.2.19 --add-module=/home/pongo/src/lua-nginx-module-0.9.5rc2 --without-http_gzip_module --with-debug
The location in the nginx.conf contains the following line:
header_filter_by_lua_file /path/to/lua/file.lua
and the lua file contains only one line:
ngx.log(ngx.EMERG, "--------<" .. ngx.status .. ">------")
on the client this prints:
TP/1.1 206 Partial Content
Server: nginx/1.4.5
Date: Thu, 13 Mar 2014 11:30:27 GMT
Content-Type: video/x-m4v
Content-Length: 991
Last-Modified: Tue, 11 Mar 2014 14:53:27 GMT
Connection: keep-alive
ETag: "531f2367-14a22b6"
Content-Range: bytes 10-1000/21635766
but in the nginx log, i see:
2014/03/13 12:30:27 [emerg] 22527#0: *6 [lua] out.lua:1: --------<200>------ while sending response to client, client: 192.168.2.100, server: localhost, request: "GET /file.m4v HTTP/1.1", host: "hostname:8080"
I have changed only the hostname and file location in the info above. I expected ngx.status to be 206 instead of 200. Is that a bug?
with best regards
Pongo