# Passing variables to handler function

**URL:** <https://www.ruby-forum.com/t/passing-variables-to-handler-function/226485>\
**Category:** NGINX\
**Created:** [December 9, 2012, 11:17am UTC](https://www.ruby-forum.com/t/passing-variables-to-handler-function/226485 "2012-12-09T11:17:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![preinde](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/779978/32.png) [@preinde](https://www.ruby-forum.com/u/preinde)\
**Post date:** [December 9, 2012, 11:17am UTC](https://www.ruby-forum.com/t/passing-variables-to-handler-function/226485/1 "2012-12-09T11:17:03Z")

</div>

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 states.

Does anybody have any suggestions?

Peter R.

Posted at Nginx Forum:

> **[Passing variables to handler function](https://forum.nginx.org/read.php?2,233751,233751#msg-233751)**
>
> 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 states. Does anybody have...
