Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Brian Moran
June 27, 2014 02:06PM
Perhaps a configuration item (ugh, another configuration option)? We
noticed this issue a number of years ago, and we have been using a
work-around for a number of years, as well.


On Fri, Jun 27, 2014 at 10:57 AM, Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Thu, Jun 26, 2014 at 11:40:27PM -0700, Piotr Sikora wrote:
>
> > # HG changeset patch
> > # User Piotr Sikora <piotr@cloudflare.com>
> > # Date 1403851163 25200
> > # Thu Jun 26 23:39:23 2014 -0700
> > # Node ID 177382006b7d7a421688831d5793b2e417074b48
> > # Parent 42114bf12da0cf3d428d0e695139f5366cbd0513
> > Core: use uppercase hexadecimal digits for percent-encoding.
> >
> > RFC3986 says that, for consistency, URI producers and normalizers
> > should use uppercase hexadecimal digits for all percent-encodings.
> >
> > This is also what modern web browsers and other tools use.
> >
> > Using lowercase hexadecimal digits makes it harder to interact with
> > those tools in case when use of the percent-encoded URI is required,
> > for example when $request_uri is part of the cache key.
> >
> > Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
> >
> > diff -r 42114bf12da0 -r 177382006b7d src/core/ngx_string.c
> > --- a/src/core/ngx_string.c Mon Jun 16 19:43:25 2014 +0400
> > +++ b/src/core/ngx_string.c Thu Jun 26 23:39:23 2014 -0700
> > @@ -1407,7 +1407,7 @@ ngx_escape_uri(u_char *dst, u_char *src,
> > {
> > ngx_uint_t n;
> > uint32_t *escape;
> > - static u_char hex[] = "0123456789abcdef";
> > + static u_char hex[] = "0123456789ABCDEF";
> >
> > /* " ", "#", "%", "?", %00-%1F, %7F-%FF */
>
> I can't say I like this change. I've considered this a while ago,
> and decided to keep it as is. This preserve compatibility with
> what nginx used to do for years. And it also looks like Apache
> does the same.
>
> Any other opinions?
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>



--
e: bmoran@onehub.com
p: +1 206 390 4376

Onehub, Inc.
www.onehub.com
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Piotr Sikora 760 June 27, 2014 02:42AM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Maxim Dounin 300 June 27, 2014 01:58PM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Brian Moran 359 June 27, 2014 02:06PM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Valentin V. Bartenev 311 June 30, 2014 08:42AM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Maxim Dounin 321 June 30, 2014 09:16PM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Piotr Sikora 360 June 30, 2014 05:02PM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Maxim Dounin 385 June 30, 2014 09:06PM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Yichun Zhang (agentzh) 277 June 30, 2014 07:26PM

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

Maxim Dounin 355 June 30, 2014 09:14PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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