[ANNOUNCE] auth request module

Maxim Dounin mdounin at mdounin.ru
Thu Mar 11 20:36:29 MSK 2010


Hello!

On Thu, Mar 11, 2010 at 12:04:14PM -0500, amvtek wrote:

> Spassiba Maxim !
> 
> Can we consume request body both in :
>  * /auth url
>  * and the latter private url

Short answer: no

Long answer:

Currently request body isn't read by auth request.  In fact it 
specially prevents this from happening, as an attempt to read 
request body from subrequest will cause SIGSEGV - nginx doesn't 
expect this to happen.

Moreover, as of now request body may be used only once if it 
doesn't fit into memory, as first successful upstream request will 
close temporary file used to buffer it.  This may even cause 
problems in nginx with official modules (e.g. ssi returned by 
backend and ssi subrequests).

I'm not sure how to fix this properly.  For now I tend to think 
that only main request should be allowed to work with request body 
and subrequest should always ignore it.

Maxim Dounin



More information about the nginx mailing list