Passing variables to handler function

Good morning,

I’m writing a custom Nginx module and am using NGX_AGAIN to call the
handler several times, however am at a loss about how to pass a variable
between calls. I want to use the variable to differentiate between

Does anybody have any suggestions?

Peter R.