Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx 1.6.0 How to stop %2B to be normalized to + ?

$
0
0
I have a setup in which nginx works as a proxy for couchdb.
With this setup I cannot retrieve an attachment with a + in the filename.

Example:
I want to retrieve file "one+name.jpg" from the server.
I do these requests:
curl 'http://example.com/database/document/one%2Bname%20tester.jpg'
In the couchdb logs I see this:
GET /database/document/one+name%20tester.jpg

The space character that is urlencoded to %20 is not decoded when passed to couchdb.
The + character that is urlencoded to %2B get decoded to + when passed to couchdb.

Since couchdb expects + to be urlencoded I get an error ('document not found').

--------
Nginx configuration:
location / {
proxy_buffering off;
proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:5984/;
}
--------

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>