Welcome! Log In Create A New Profile

Advanced

Re: Async operation in pre-access phase?

Maxim Dounin
August 18, 2016 04:06PM
Hello!

On Thu, Aug 18, 2016 at 03:48:31AM -0400, leeyiw wrote:

> Hi, everyone:
> I want to develop a module that send/recv in pre-access handler
> asynchronously, and my pre-access handler will return NGX_AGAIN.
> My question is when my send/recv callback is called, how can I continue the
> request? By default it's block forever.

Try looking into limit_req module,
src/http/modules/ngx_http_limit_req_module.c, it contains a
relevant code. In general, you have call

ngx_http_core_run_phases(r);

once you've done with your async processing.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Async operation in pre-access phase?

leeyiw August 18, 2016 03:48AM

Re: Async operation in pre-access phase?

Maxim Dounin August 18, 2016 04:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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