dylanz nginx-forum at
Wed Dec 23 03:36:34 MSK 2009

Gotcha.  Thanks Marcus, that makes perfect sense.
In regard to echo_location_async, I'm assuming it would allow something like so?

location /first {
  echo "before";
  echo_location_aysnc /second$request_uri;
  echo "after"

location /second(.*)\?(.*)^ {
  set $memcached_key $1;  # needing this to be keyed on the request_path, not the entire uri

That doesn't seem to work, and am not able to extrapolate the request path out of there.

The other concern is that if I was to patch the before/after echo methods, if they would be
returned in the response even if there was no valid body being passed back?  For example:

location /first {
  echo_before_body -n "before";
  echo_location_aysnc /null;  # this returns nothing
  echo_after_body -n "after"

In the above scenario, I think I'd have a response of "before after", even if the async call returned an empty response.
Think I'm slowly getting there, and just need to make sure I'm picking the correct route :)

Posted at Nginx Forum:,31961,32902#msg-32902

More information about the nginx mailing list