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

Re: URL decoding changed semantics of + in URLs

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 26, 2010, 17:57 UTC
Message-ID
<AANLkTikmFVHeMVEgj_G5h8VMNaw0zIm0Ol-vC1ffc45v@mail.gmail.com>
In-Reply-To
<20100726154041.GA18762@coredump.intra.peff.net>
On Mon, Jul 26, 2010 at 15:40, Jeff King <peff@peff.net> wrote:
> As Jasper noted, "+" is a reserved character, which means "gtk+"
> probably _should_ be escaped. But clearly it doesn't happen in practice,
> and I am more interested in not breaking current use than in nitpicking
> with a standard.

Reserved characters only have to be escaped in certain contexts, from RFC 2396:

   Many URI include components consisting of or delimited by, certain
   special characters.  These characters are called "reserved", since
   their usage within the URI component is limited to their reserved
   purpose.  If the data for a URI component would conflict with the
   reserved purpose, then the conflicting data must be escaped before
   forming the URI.
      reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                    "$" | ","

E.g. @ is special in the hostname part (http://user@example.org), but writing http://example.org/Git@Big%20companies:%20A%20Study is just fine.

Which is why curl passes it along literally, it *can* escape them, and real webservers like Apache handle reserved characters equivalently (in their unreserved contexts) whether they're escaped or not, but the git-daemon at git.gnome.org evidently doesn't implement RFC 2396 carefully enough.

So we shouldn't escape + for backwards compatibility and because it's not necessary, but we should probably also fix git-daemon to accept both forms if that hasn't been done already.

Previous: Jeff KingNext: Jasper St. Pierre
Message 14 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.