Missing period character in URL

Maxim Dounin mdounin at mdounin.ru
Fri Mar 1 13:27:25 UTC 2019


Hello!

On Fri, Mar 01, 2019 at 06:16:19AM -0500, kagemandandersen wrote:

> I have a service that sends request through our Nginx gateway proxy. The URL
> contains two period characters (e.g.
> https://localhost:1234/servicename/some.name./serviceendpoint). When the URL
> is passed through the Nginx gateway, the URL is missing the last period
> character in the URL, resulting in a failure. 
> 
> Any idea what could cause this behaviour? A URL normaliser perhaps? 
> 
> I am using Nginx version 1.15.7 for Windows.

On Windows, trailing dot is not significant and is ignored by 
filesystem accesses, so it is normalized away.  See here for more 
details:

http://hg.nginx.org/nginx/rev/5d86ab8f2340
http://mailman.nginx.org/pipermail/nginx-announce/2012/000086.html

If you want nginx to preserve URI of a request exactly as it was 
provided by the client - make sure to use proxy_pass without an 
URI compontent, that is:

    location / {
        proxy_pass http://backend;
    }

Note no trailing "/" after "backend".

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list