Best Practice Behaviour of Body Handler

Piotr Sikora piotr.sikora at
Mon Jan 9 21:56:48 UTC 2012


> Will it accept/output BSON or JSON (or something else)? I know mine
> outputs JSON at the moment, but I was thinking it would be better for
> it to accept/output BSON instead, with a JSON filter as a separate
> module. This allows for post-processing the BSON with another module
> and interchanging the *final* format delivered to the client, as well
> as separating the business logic from the display logic physically.

Output: BSON and JSON (via BSON-JSON output filter).

Input: currently it's JSON, but since it's converted to BSON before being 
passed to mongodb, I don't see a reason why it shouldn't accept BSON as well 

> As a side note, is there a way of controlling the order filters are
> loaded? If so, can you point me towards some docs?

Order of 3rd-party filter is the same as order of --add-module directives 
passed to the ./configure script.

Best regards,
Piotr Sikora < piotr.sikora at >

More information about the nginx-devel mailing list