Best Practice Behaviour of Body Handler
alex at alexchamberlain.co.uk
Fri Jan 6 16:10:58 UTC 2012
I've started to develop a RESTful interface onto MongoDB as an Nginx
Module. I've started to work on PUT requests, and I'm just wondering about
a couple of things with the body handler.
My content handler registers the body handler
When this gets called, if everything goes correctly, I either want to send
204 No Content or 303 See Other. Therefore, no body. What should I be
calling ngx_http_finalize_request with? I'm currently passing zero-length
buffers, and I'm getting alerts, so it must be wrong...
On the other hand, if something goes wrong, I suspect I should still be
calling ngx_http_finalize_request, right? If so, what should the arguements
Thanks for your help. My code can be found at
https://github.com/alexchamberlain/ngx-mongodb. I'd be very interested on
any feedback, but please bear in mind I'm relatively inexperienced, so I
expect to make mistakes and really won't mind any friendly advice.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx-devel