my workflow is following:
- accept request
- with ruby script do some stuff
- send x-accel-redirect header and return
- ... client receives data ...
- client disconnected
- <- here I would like to run some script
What I need: some http headers from client and headers sent by initial script.
My first idea was to parse logs, but it can break really easily. Other option would be force nginx to log to some custom daemon or to socket. Or use some callback after end of x-accel-redirect request.
Question is: Is it possible to setup nginx (without any patch) use as log: syslog, custom daemon, socket or some daemon reading from fake file. Or setup some callback after request?