git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: URL decoding changed semantics of + in URLs

From
Jasper St. Pierre <jstpierre@mecheye.net>
Date
Jul 26, 2010, 18:44 UTC
Message-ID
<AANLkTinmwZiqdhrzSnF=3nADwoFbor8XUAfw1LDjWoHR@mail.gmail.com>
In-Reply-To
<AANLkTilDKIwcQ0OmXAihq8AkS7v31HseEI3BGTUyzl9v@mail.gmail.com>

Hm. I've always wondered about the percent double-encoding problem, where the "%" in "%2B" double-encodes to "%252B", which might require the mandatory server implementation then.

I do think that because "git://git.gnome.org/git+" was working, something on the server was going right.

On Mon, Jul 26, 2010 at 2:35 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 28 quoted lines
> On Mon, Jul 26, 2010 at 18:22, Jasper St. Pierre <jstpierre@mecheye.net> wrote:
>> Where is '+' used in the URL context? I don't see that it's a
>> replacement for '+'
>> aside from formencoded, which is from CGI, not HTTP or the URI spec.
>
> In my example? Nowhere, but I used : and @, which are also reserved
> characters.
>
>> I also can't access something called "test 2.txt" from Apache with
>> "http://localhost/test+2.txt", so I don't think it's unescaping the '+'.
>
> Yes, that's not supposed to work. But you should be able to access
> "test+2.txt" using /test+2.txt and /test%2B.txt and
> /%74%65%73%74%2B2%2E%74%78%74 for that matter.
>
> git-daemon only seems to handle the first form. Which is probably a
> bug, maybe it doesn't *have to* URI unescape its arguments, but it's
> probably a good idea anyway. E.g. some systems that handle URIs will
> convert : to %3A automatically when passing them through. That would
> break a git URL.
>
>> I don't think we should do anything about the '+' case, except where used in
>> formencoded parameters (aka the "query string"), where it is used.
>
> I don't really have an opinion on what we should do. It's not a
> problem for me, I'm just noting how it could break, and that maybe we
> should try harder and support URI escaping where we handle URLs.
>
Previous: Ævar Arnfjörð Bjarmason
Message 18 of 18 in “URL decoding changed semantics of + in URLs”
  1. Thomas RastJul 23, 2010
  2. Thomas RastJul 23, 2010
  3. Ævar Arnfjörð BjarmasonJul 23, 2010
  4. Jasper St. PierreJul 23, 2010
  5. Do not unquote + into ' ' in URLsThomas Rast, Jul 23, 2010
  6. Ævar Arnfjörð BjarmasonJul 23, 2010
  7. Junio C HamanoJul 23, 2010
  8. Thomas RastJul 23, 2010
  9. Do not unquote + into ' ' in URLsThomas Rast, Jul 24, 2010
  10. Jasper St. PierreJul 31, 2010
  11. Thomas RastJul 31, 2010
  12. Ralf EbertAug 6, 2010
  13. Jeff KingJul 26, 2010
  14. Ævar Arnfjörð BjarmasonJul 26, 2010
  15. Jasper St. PierreJul 26, 2010
  16. Matthieu MoyJul 26, 2010
  17. Ævar Arnfjörð BjarmasonJul 26, 2010
  18. Jasper St. PierreJul 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.