# An unexpected newline appears when use memc and echo location async, how to delete the newline?

**URL:** <https://www.ruby-forum.com/t/an-unexpected-newline-appears-when-use-memc-and-echo-location-async-how-to-delete-the-newline/220660>\
**Category:** NGINX\
**Created:** [June 15, 2012, 3:57pm UTC](https://www.ruby-forum.com/t/an-unexpected-newline-appears-when-use-memc-and-echo-location-async-how-to-delete-the-newline/220660 "2012-06-15T15:57:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [June 15, 2012, 3:57pm UTC](https://www.ruby-forum.com/t/an-unexpected-newline-appears-when-use-memc-and-echo-location-async-how-to-delete-the-newline/220660/1 "2012-06-15T15:57:07Z")

</div>

I use the agenzh’s two modules

> **[Memc | NGINX](https://www.nginx.com/resources/wiki/modules/memc/)**
>
> The Memc module is an An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands.

> **[HTTP Echo Module | NGINX](https://www.nginx.com/resources/wiki/modules/echo/)**
>
> The HTTP Echo module brings "echo", "sleep", "time", "exec" and more shell-style goodies to your NGINX configuration files.

\*nginx configuration:  
\*  
location ~ “^/property/([0-9]+)” {  
charset utf-8;  
default\_type ‘text/javascript’;  
echo -n “$arg\_callback({"property\_$1":"”;  
echo\_location\_async /statistic/operator  
“cmd=incr&key=property\_$1&value=1”;  
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 {
    internal;
    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:  
\*  
[http://domain.net/property/23458?hi=231231&callback=himycallback201203455](http://domain.net/property/23458?hi=231231&callback=himycallback201203455)

The Unexpected incorrect Output: (Current Configuration)

himycallback201203455({“property\_23458”:24  
})

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 ? )

himycallback201203455({“property\_23458”:24})
