All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Thomas Rast <trast@student.ethz.ch>,
	git@vger.kernel.org, jstpierre@mecheye.net
Subject: Re: URL decoding changed semantics of + in URLs
Date: Mon, 26 Jul 2010 17:57:48 +0000	[thread overview]
Message-ID: <AANLkTikmFVHeMVEgj_G5h8VMNaw0zIm0Ol-vC1ffc45v@mail.gmail.com> (raw)
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.

  reply	other threads:[~2010-07-26 17:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23 13:18 URL decoding changed semantics of + in URLs Thomas Rast
2010-07-23 13:21 ` Thomas Rast
2010-07-23 14:10 ` Ævar Arnfjörð Bjarmason
2010-07-23 14:25   ` Jasper St. Pierre
2010-07-23 21:23   ` [PATCH] Do not unquote + into ' ' " Thomas Rast
2010-07-23 22:20     ` Ævar Arnfjörð Bjarmason
2010-07-23 22:26     ` Junio C Hamano
2010-07-23 23:04       ` Thomas Rast
2010-07-24 14:49         ` [PATCH v2] " Thomas Rast
2010-07-31 21:18           ` Jasper St. Pierre
2010-07-31 21:33             ` Thomas Rast
2010-08-06 10:46               ` Ralf Ebert
2010-07-26 15:40 ` URL decoding changed semantics of + " Jeff King
2010-07-26 17:57   ` Ævar Arnfjörð Bjarmason [this message]
2010-07-26 18:22     ` Jasper St. Pierre
2010-07-26 18:30       ` Matthieu Moy
2010-07-26 18:35       ` Ævar Arnfjörð Bjarmason
2010-07-26 18:44         ` Jasper St. Pierre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikmFVHeMVEgj_G5h8VMNaw0zIm0Ol-vC1ffc45v@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jstpierre@mecheye.net \
    --cc=peff@peff.net \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.