Welcome! Log In Create A New Profile

Advanced

Best Practice Behaviour of Body Handler

Alex Chamberlain
January 06, 2012 11:12AM
Hi all,

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
using ngx_http_read_client_request_body.

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
be then?

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.

Alex Chamberlain
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Best Practice Behaviour of Body Handler

Alex Chamberlain 1819 January 06, 2012 11:12AM

Re: Best Practice Behaviour of Body Handler

agentzh 507 January 07, 2012 06:44AM

Re: Best Practice Behaviour of Body Handler

Piotr Sikora 517 January 09, 2012 09:18AM

Re: Best Practice Behaviour of Body Handler

Alex Chamberlain 553 January 09, 2012 10:02AM

Re: Best Practice Behaviour of Body Handler

Piotr Sikora 547 January 09, 2012 10:10AM

Re: Best Practice Behaviour of Body Handler

Alex Chamberlain 482 January 09, 2012 03:10PM

Re: Best Practice Behaviour of Body Handler

Piotr Sikora 567 January 09, 2012 04:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 281
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