Forum: NGINX Generating a new request when handling one in a module

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 lvella (Guest)
on 2013-07-18 05:25
(Received via mailing list)
I want to modify third party longpoll module nginx_http_push_module ( ) to notify upstream every time a request
waiting for a new publication, sending original headers and all, so I
in my upstream application that there is a user connected on the
and even what user is it, if I can have access to the session cookies.
results of this notification request isn't really going anywhere and is
of interest.

My idea was to generate a new request to a "internal" marked location,
copying the relevant headers from the original request, while handling
later (thus inserting a new request in the nginx HTTP request processing
stack, and discarding its results). This new request would be
from there on.

At first it seemed a simple approach, but now that I browsed through
examples modules, I am not so sure anymore. I failed to find any module
does something like this, and I could not find the relevant API to
"offspring" such relatively independent HTTP request.

Do you think this is a good approach? Can you point me the API I should
or a sample module that does something like this?

Posted at Nginx Forum:,240974,240974#msg-240974
This topic is locked and can not be replied to.