404 ist quite obvious ...
cant you just
location /blah {
...
return 204;
#or incase 200 is needed
}
2014-04-02 9:56 GMT+02:00 SSD <sagar...@gmail.com>:
> I tried the following and I see no more "zero size buf in writer" in logs.
> However, my libcurl client is getting
>
> My fix:
>
> r->headers_out.status = NGX_HTTP_OK;
> r->headers_only = 1;
> r->headers_out.content_length_n = 0;
> rc = ngx_http_send_header(r);
> ngx_http_finalize(r, rc)
>
> -----------------------------------------------------
>
> Still the error I see on libcurl C client:
>
> <html>
> <head><title>404 Not Found</title></head>
> <body bgcolor="white">
> <center><h1>404 Not Found</h1></center>
> <hr><center>ngx_openresty/1.4.3.6</center>
> </body>
> </html>
>
> Any help is highly appreciated. I need the client to receive http 200 OK
>
>
> On Wednesday, April 2, 2014 12:29:20 AM UTC-7, SSD wrote:
>>
>> Not quite related. On further troubleshooting, I found that this errror
>> occurs when respone Content-Length is 0.
>>
>> How can one send empty response body and yet 200 http ok back to client
>> from nginx module ?
>>
>>
>>
>> On Tuesday, April 1, 2014 11:59:00 PM UTC-7, mex wrote:
>>>
>>> did not read the thread, but might be related:
>>> http://forum.nginx.org/read.php?2,231543,231543
>>>
>>>
>>> regrads,
>>>
>>>
>>> mex
>>>
>>> 2014-04-02 8:51 GMT+02:00 SSD <sagar...@gmail.com>:
>>> > Hi,
>>> >
>>> > I have written an nginx module that handles POST request (uploads of
>>> > files ~
>>> > 17 MB). When I enable nginx debug logs, I see
>>> >
>>> > 2014/04/01 23:43:56 [alert] 13869#0: *1 zero size buf in writer t:0 r:0
>>> > f:0
>>> > 0000000000000000 0000000000000000-0000000000000000 0000000000000000
>>> > 0-0,
>>> > client: 127.0.0.1, server: localhost, request: "POST /1 HTTP/1.1",
>>> > host:
>>> > "localhost:9701"
>>> >
>>> > And the client ( C program using libcurl ) fails with
>>> >
>>> >
>>> > curl_easy_perform failed: Server returned nothing (no headers, no data)
>>> >
>>> >
>>> > Any ideas what is going wrong ?
>>> >
>>> >
>>> > Thanks
>>> > Saga.