nginx gunzip memcached data , xss_callback failed

xinster8192 nginx-forum at
Wed Jun 11 03:13:07 UTC 2014

I use nginx to read mecached data and write to memcached by java
XmemcachedClient . Xmemcached compress data that larger than 256kB before
write . So nginx i use ngx_gunzip_module and memcached_gzip_flag to unzip
data from mecached to be sure unzip is Ok . the problem is xss_callback_arg
is failed . when i delete memcached_gzip_flag , the xss_callback_arg is Ok
,but the result is conrupted . Is there good way to gunzip the memcached
data first , then xss_callback_arg second . this is part of nginx.conf

location ^~ /api/2/topic/nodejs {
   set_unescape_uri $topicurl $arg_topicurl;
   set_unescape_uri $topicurl $topicurl;
   set_md5 $md5_key $arg_client_id$topicurl$arg_topicsid;
   set $memcached_key '/topic/nodejs?$md5_key';
   memcached_gzip_flag 2;
   memcached_pass memcached-cluster;
   error_page 404 501 502 = @miss;
   xss_get on;
   xss_callback_arg 'callback';
   xss_input_types 'application/json text/plain';

Posted at Nginx Forum:,250779,250779#msg-250779

More information about the nginx mailing list