ngx_rewrite_set()

Eugaia ngx.eugaia at gmail.com
Wed Oct 13 04:14:13 MSD 2010


  Hi,

Is there a reason why the following lines in ngx_rewrite_set() :

     if (v->get_handler == NULL
&& ngx_strncasecmp(value[1].data, (u_char *) "http_", 5) != 0
&& ngx_strncasecmp(value[1].data, (u_char *) "sent_http_", 10) != 0
&& ngx_strncasecmp(value[1].data, (u_char *) "upstream_http_", 14) != 0)
     {
         v->get_handler = ngx_http_rewrite_var;
         v->data = index;
     }

do not include "cookie_" and "arg_"?  It would appear to me that it 
should be :

     if (v->get_handler == NULL
&& ngx_strncasecmp(value[1].data, (u_char *) "arg_", 4) != 0
&& ngx_strncasecmp(value[1].data, (u_char *) "cookie_", 7) != 0
&& ngx_strncasecmp(value[1].data, (u_char *) "http_", 5) != 0
&& ngx_strncasecmp(value[1].data, (u_char *) "sent_http_", 10) != 0
&& ngx_strncasecmp(value[1].data, (u_char *) "upstream_http_", 14) != 0)
     {
         v->get_handler = ngx_http_rewrite_var;
         v->data = index;
     }

Thanks,

Marcus.



More information about the nginx-devel mailing list