Welcome! Log In Create A New Profile

Advanced

Re: Forcing URLs to lower case example

March 07, 2024 03:00PM
On Thu, Mar 7, 2024 at 1:54 PM Victor Oppenheimer <victor@camb.com> wrote:
>
> I am using nginx on MS Windows primarily for reverse proxying.
>
> I would like to force URLs reaching nginx into lower case before further
> processing in my nginx.configfile.
>
> That is, I'd like subsequent server and/or location directives to all
> receive lower case versions of URLs being processed regardless of the
> case mixture of the original URL.
>
> Is this possible? If so I'd appreciate a link to the relevant
> documentation and perhaps examples. If not, how close can I come to
> making nginx on windows case independent?

Related, that may not be a good idea. The scheme and host part of a
URL is not case sensitive. However, the remaining path and query of
the URL might be case sensitive. Whether the remaining parts are
case-sensitive depends on the scheme.

RFC 3986, Section 6.2.2.1, Case Normalization:

For all URIs, the hexadecimal digits within a percent-encoding
triplet (e.g., "%3a" versus "%3A") are case-insensitive and therefore
should be normalized to use uppercase letters for the digits A-F.

When a URI uses components of the generic syntax, the component
syntax equivalence rules always apply; namely, that the scheme and
host are case-insensitive and therefore should be normalized to
lowercase. For example, the URI HTTP://www.EXAMPLE.com/ is
equivalent to http://www.example.com/. The other generic syntax
components are assumed to be case-sensitive unless specifically
defined otherwise by the scheme (see Section 6.2.3).

Jeff
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Forcing URLs to lower case example

Victor Oppenheimer March 07, 2024 01:56PM

Re: Forcing URLs to lower case example

noloader March 07, 2024 03:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 210
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