Welcome! Log In Create A New Profile

Advanced

Best way to terminate handling a request

Ottavio Campana
January 17, 2019 01:00AM
Hello,

I am hacking the ngx_http_auth_request module (
https://www.nginx.com/resources/wiki/extending/examples/auth_request/ ) so
that as soon as the URL is parsed, I transfer the connection fd to another
processo through a AF_UNIX socket.

Everything is done in the ngx_http_auth_request_handler function.

I see the other process receiving the file descriptor, I must now tell
nginx to stop processing the request, to close the socket and to do
nothing. The response will be generate by the other process.

Is invoking ngx_close_socket r->connection->fd) and returning NGX_ABORT the
correct way of doing it?

Thank you,

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

Best way to terminate handling a request

Ottavio Campana January 17, 2019 01:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready