It turned out that it is a bug in Restlet: when the HTTP header contains "Connection:Close", the server will not send a response.
I made Nginx not send this header with the following modification and it worked.
location /proxy/ping {
proxy_pass http://localhost:8182/ping;
proxy_set_header Connection "";
}
Here is the link to the (still not fixed 3 years after it has been opened) Restlet bug: http://restlet.tigris.org/issues/show_bug.cgi?id=1191