<p>Hello list!</p>
<p>I first sent this mail to <a href="mailto:nginx@nginx.org">nginx@nginx.org</a>, but realized that this list is probably more suitable. Especially since I got no response whatsoever :)</p>
<p>I wanted to use my nginx logs to power click track analysis like<br>
<a href="http://statviz.sourceforge.net/">http://statviz.sourceforge.net/</a> for example, and therefore I used the<br>
userid module.</p>
<p>I realized quickly that it either sets $uid_set or $uid_got, never<br>
both, which makes it hard to get one single column in the logfile that<br>
entails the userid.</p>
<p>So I devised the following patch for this purpose:</p>
<p>-----------------------------------8&lt;--------------------------------------------<br>
--- nginx-0.7.67/src/http/modules/ngx_http_userid_filter_module.c       2010-06-07<br>
11:54:19.000000000 +0200<br>
+++ nginx-0.7.67-martin//src/http/modules/ngx_http_userid_filter_module.c       2011-02-24<br>
13:16:20.000000000 +0100<br>
@@ -275,9 +275,11 @@</p>
<p>    ctx = ngx_http_get_module_ctx(r, ngx_http_userid_filter_module);</p>
<p>-    if (ctx == NULL || ctx-&gt;uid_set[3] == 0) {<br>
-        v-&gt;not_found = 1;<br>
-        return NGX_OK;<br>
+    if (ctx == NULL) {<br>
+      v-&gt;not_found = 1;<br>
+      return NGX_OK;<br>
+    } else if (ctx-&gt;uid_set[3] == 0) {<br>
+      return ngx_http_userid_got_variable(r, v, data);<br>
    }</p>
<p>    conf = ngx_http_get_module_loc_conf(r, ngx_http_userid_filter_module);<br>
-----------------------------------8&lt;--------------------------------------------</p>
<p>Since I have no real ambition to have my own fork of nginx, I would<br>
love to hear about the possibilities to get this modification, or<br>
another that solves my problem in a more nginxy way, into the main<br>
branch.</p>
<p>regards,<br>
//Martin Bruse<br>
</p>