<div dir="ltr">Sorry I'm bad. I understood that header filters won't help you. Use the ACCESS PHASE handler, it should work fine for you.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 13, 2023 at 10:57 PM Vasiliy Soshnikov <<a href="mailto:vasiliy.soshnikov@gmail.com">vasiliy.soshnikov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>> Is there something similar done before?</div><div>I'm thinking that you would like to test the incoming path and execute some logic. </div><div><br></div><div>You could use a header filter for that and also you could keep a body filter for handling the request body.</div><div>Also pls take a look into PHASEs, I'm thinking you could try to add your own ACCESS PHASE.</div><div><br></div><div>And the last one: for keeping your context (some variables or data) for this request between filters, phases you could use request's context.</div><div><br></div><div>Probably, examples would help you: <a href="https://github.com/dedok/nginx-tutorials" target="_blank">https://github.com/dedok/nginx-tutorials</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 13, 2023 at 10:56 AM Muhammad Nuzaihan <<a href="mailto:zaihan@unrealasia.net" target="_blank">zaihan@unrealasia.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I need to process requests with only URI path (without body) for a module.<br>
<br>
It seems ngx_http_request_body_filter_pt is *not* executed whenever<br>
there is a request without a body (it looked like it bypassed without<br>
request body) and only ngx_http_output_body_filter_pt part of the<br>
code is executed.<br>
<br>
For example i do a request curl curl like this:<br>
<br>
curl -vvvv -X POST <a href="http://localhost:8080/proxy/profile/alice/comment" rel="noreferrer" target="_blank">http://localhost:8080/proxy/profile/alice/comment</a><br>
<br>
and i need to validate /proxy/profile/alice/comment in my module and<br>
there is no http headers and no body. Only URI path.<br>
<br>
Is there something similar done before?<br>
<br>
Thank you,<br>
Muhammad Nuzaihan<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org" target="_blank">nginx-devel@nginx.org</a><br>
<a href="https://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">https://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</blockquote></div>
</blockquote></div>