<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 28.02.2011, at 12:08, Martin Bruse wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p>Please, just tell me if there is no hope, so that I can get on with setting up my own nginx-patch-repository :) </p><p>I really would like the possibility to have the uid in a single column. What would otherwise be the best way?</p></blockquote>So basically you need that $uid_set logs set userid value, and if it's not set got userid value ?</div><div>This patch will break existent setup, because $uid_set should log only set userid.</div><div>In 0.9.0 you can use</div><div><br></div><div>map $uid_set $uid {</div><div> default $uid_set;</div><div> "" $uid_got;</div><div>}<br><blockquote type="cite"><p>//Martin</p> <div class="gmail_quote">On 25 Feb 2011 10:40, "Martin Bruse" <<a href="mailto:zondolfin@gmail.com">zondolfin@gmail.com</a>> wrote:<br type="attribution">> Hello list!<br>> <br>> I first sent this mail to <a href="mailto:nginx@nginx.org">nginx@nginx.org</a>, but realized that this list is<br> > probably more suitable. Especially since I got no response whatsoever :)<br>> <br>> 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.<br>> <br>> 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.<br>> <br> > So I devised the following patch for this purpose:<br>> <br>> -----------------------------------8<--------------------------------------------<br>> --- nginx-0.7.67/src/http/modules/ngx_http_userid_filter_module.c<br> > 2010-06-07<br>> 11:54:19.000000000 +0200<br>> +++ nginx-0.7.67-martin//src/http/modules/ngx_http_userid_filter_module.c<br>> 2011-02-24<br>> 13:16:20.000000000 +0100<br>> @@ -275,9 +275,11 @@<br>> <br> > ctx = ngx_http_get_module_ctx(r, ngx_http_userid_filter_module);<br>> <br>> - if (ctx == NULL || ctx->uid_set[3] == 0) {<br>> - v->not_found = 1;<br>> - return NGX_OK;<br>> + if (ctx == NULL) {<br> > + v->not_found = 1;<br>> + return NGX_OK;<br>> + } else if (ctx->uid_set[3] == 0) {<br>> + return ngx_http_userid_got_variable(r, v, data);<br>> }<br>> <br>> conf = ngx_http_get_module_loc_conf(r, ngx_http_userid_filter_module);<br> > -----------------------------------8<--------------------------------------------<br>> <br>> 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.<br>> <br>> regards,<br>> //Martin Bruse<br></div> _______________________________________________<br>nginx-devel mailing list<br><a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>http://nginx.org/mailman/listinfo/nginx-devel<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Helvetica; "><div><br class="Apple-interchange-newline">--</div><div>Igor Sysoev</div><div><a href="http://sysoev.ru/en/">http://sysoev.ru/en/</a></div></span></span> </div><br></body></html>