echo_location Not Working

adamchal nginx-forum at nginx.us
Wed Sep 26 17:03:22 UTC 2012


Anybody having issues with the echo_location (and echo_location_async)
directive?  I have tried to get this to work with v1.1.18 and v1.3.6, and
they both exhibit the same behavior.  Basically, only the output from the
/main block is echo'd out.

My nginx config (basically a copy-and-paste) from the echo module's
documentation:

    location /main {
        echo_reset_timer;
        echo_location_async GET /sub1;
        echo_location /sub2;
        echo "took $echo_timer_elapsed sec for total.";
    }
    location /sub1 {
        echo_sleep 2;
        echo hello;
    }
    location /sub2 {
        echo_sleep 1;
        echo world;
    }


# curl -D /dev/stdout http://localhost/main
HTTP/1.1 200 OK
Server: nginx/1.3.6
Date: Wed, 26 Sep 2012 16:37:37 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive

took 1.002 sec for total.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,231107,231107#msg-231107



More information about the nginx mailing list