<div><font face="lucida Grande, Verdana"><span style="line-height: 22px;">I think lowercase hexadecimal is good for chinese.</span></font><span id="_editor_bookmark_start_0" style="display: none; line-height: 0px;">‍</span></div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "Ruslan Ermilov";<ru@nginx.com>;</div><div><b>Date: </b> Tue, Jul 1, 2014 01:26 PM</div><div><b>To: </b> "Maxim Dounin"<mdounin@mdounin.ru>; <wbr></div><div><b>Cc: </b> "nginx-devel"<nginx-devel@nginx.org>; <wbr></div><div><b>Subject: </b> Re: [PATCH] Core: use uppercase hexadecimal digits forpercent-encoding</div></div><div><br></div>On Tue, Jul 01, 2014 at 05:15:06AM +0400, Maxim Dounin wrote:<br>> On Mon, Jun 30, 2014 at 04:41:26PM +0400, Valentin V. Bartenev wrote:<br>> > On Friday 27 June 2014 21:57:54 Maxim Dounin wrote:<br>> > > Hello!<br>> > > <br>> > > On Thu, Jun 26, 2014 at 11:40:27PM -0700, Piotr Sikora wrote:<br>> > > <br>> > > > # HG changeset patch<br>> > > > # User Piotr Sikora <piotr@cloudflare.com><br>> > > > # Date 1403851163 25200<br>> > > > #      Thu Jun 26 23:39:23 2014 -0700<br>> > > > # Node ID 177382006b7d7a421688831d5793b2e417074b48<br>> > > > # Parent  42114bf12da0cf3d428d0e695139f5366cbd0513<br>> > > > Core: use uppercase hexadecimal digits for percent-encoding.<br>> > > > <br>> > > > RFC3986 says that, for consistency, URI producers and normalizers<br>> > > > should use uppercase hexadecimal digits for all percent-encodings.<br>> > > > <br>> > > > This is also what modern web browsers and other tools use.<br>> > > > <br>> > > > Using lowercase hexadecimal digits makes it harder to interact with<br>> > > > those tools in case when use of the percent-encoded URI is required,<br>> > > > for example when $request_uri is part of the cache key.<br>> > > > <br>> > > > Signed-off-by: Piotr Sikora <piotr@cloudflare.com><br>> > > > <br>> > > > diff -r 42114bf12da0 -r 177382006b7d src/core/ngx_string.c<br>> > > > --- a/src/core/ngx_string.c      Mon Jun 16 19:43:25 2014 +0400<br>> > > > +++ b/src/core/ngx_string.c Thu Jun 26 23:39:23 2014 -0700<br>> > > > @@ -1407,7 +1407,7 @@ ngx_escape_uri(u_char *dst, u_char *src,<br>> > > >  {<br>> > > >      ngx_uint_t      n;<br>> > > >      uint32_t       *escape;<br>> > > > -    static u_char   hex[] = "0123456789abcdef";<br>> > > > +    static u_char   hex[] = "0123456789ABCDEF";<br>> > > >  <br>> > > >                      /* " ", "#", "%", "?", %00-%1F, %7F-%FF */<br>> > > <br>> > > I can't say I like this change.  I've considered this a while ago, <br>> > > and decided to keep it as is.  This preserve compatibility with <br>> > > what nginx used to do for years.  And it also looks like Apache <br>> > > does the same.<br>> > > <br>> > > Any other opinions?<br>> > > <br>> > <br>> > I prefer to fix this instead of keeping it for another few years. <br>> > <br>> > Uppercase digits also look more distinctly, since all other parts<br>> > of path are usually in lowercase.<br>> <br>> Ruslan?  Igor?<br><br>I don't really care, but just to be in line with RFC recommendations<br>and our own comments (see above, it's in the patch context), I think<br>we can switch to using upper case.<br><br>_______________________________________________<br>nginx-devel mailing list<br>nginx-devel@nginx.org<br>http://mailman.nginx.org/mailman/listinfo/nginx-devel<br>.<br></div>