processing a request without body

Maxim Dounin mdounin at mdounin.ru
Fri Jan 12 22:23:04 UTC 2024


Hello!

On Fri, Jan 12, 2024 at 10:17:42PM +0800, Muhammad Nuzaihan wrote:

> Hi Maxim,
> 
> Thank you so much for your explaination.
> 
> I have another question. If i have an empty string in my payload, it
> skips the phase handler completely.
> 
> Example: curl -X POST http://localhost/proxy/profile/alice/comment -d
> '' -H 'Content-Type: application/json'
> 
> the flag "-d ''"
> 
> I do doing it at NGX_HTTP_ACCESS_PHASE in the handler. It seems that
> if "content_length = 0", it skips the access phase handler as well?

Access phase handlers are called for all requests (unless these 
are rejected at earlier stages).  If in doubt, consider configuring 
debug logging and add appropriate debug logging to your module, it 
should make things obvious enough.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list