an unexpected newline appears when use memc and echo_location_async, how to delete the newline ?

Xiangong Yang monitor.xoyo at
Fri Jun 15 13:49:57 UTC 2012

I use the agenzh's two modules

*nginx configuration:*

    location ~ "^/property/([0-9]+)" {
        charset utf-8;
        default_type 'text/javascript';
        echo -n "$arg_callback({\"property_$1\":\"";
        echo_location_async /statistic/operator
        echo -n "\")";

    # GET /statistic/operator?cmd=incr&key=property_23214&value=2
    # GET /statistic/operator?cmd=decr&key=property_23214&value=1
    location /statistic/operator {
        set $memc_cmd $arg_cmd;
        set $memc_key $arg_key;
        set $memc_value $arg_value;
        memc_pass statistics_server_pool;
        memc_cmds_allowed incr decr set get delete add;
        add_header X-Memc-Flags 'Statistic Crement';

*Request URL:*

*The Unexpect  incorrect Output: (Current Configuration)*


The new line after 24 is unexpected. and how can l delete the new line ?

*I expected the correct Output: ( how to configuration the nginx ? )*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list