I needed to send an URI through Nginx to the backend servers (Mongrel) intact. However Nginx was constantly unescaping the URI, and removed slashes in the process. That resulted in an invalid URL at the backend server. The fix was simple, but extremely hard to find. Just remove the trailing slash from the proxy_pass directive, like below.
Invalid URI is sent to the backend server with this configuration of Nginx.
Valid, untampered URI is sent with this configuration of Nginx.