On Saturday, July 11, 2015 at 7:40:00 PM UTC+5:30, kamalp wrote:
HI
I have location block in my nginx.conf file
.
location /myweb {
alias /workspace/nginx/myweb/;
access_by_lua_file /workspace/nginx/conf/
mylua.lu;
index del.png;
}
When i am sending request as "curl
http://x.y.z.w/myweb " it suppose to serve
"del.png" and should give "Content-Type: image/png" but it provides "Content-Type: application/octet-stream".
but when i send request as "curl
http://x.y.z.w/myweb/del.png" then it correctly give "Content-Type: " .
As per my debugging Lua module first intercept the request and it doesn't know "Content-Type: " so it incorrectly sets it to "Content-Type: application/octet-stream". After lua module has processed it it goes to another Content generation module but as lua has incorrectly set up Content-Type it let it go.
is this known issue with lua module.
seems it has already been submitted using another issue "Nginx Lua adds the Content-Type header to responses"
but i don't see any patch/solution to it.