Welcome! Log In Create A New Profile

Advanced

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

Nginx 1.6.0 How to stop %2B to be normalized to + ?
July 31, 2014 03:58AM
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/;
}
--------



Edited 1 time(s). Last edit at 07/31/2014 04:05AM by InteractiveBlueprints.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready