login
Header Space

 
 

Re: remote#branch

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jan Hudec <bulb@...>
Cc: Linus Torvalds <torvalds@...>, Tom Prince <tom.prince@...>, Theodore Tso <tytso@...>, Junio C Hamano <gitster@...>, Johannes Schindelin <Johannes.Schindelin@...>, Petr Baudis <pasky@...>, Paolo Ciarrocchi <paolo.ciarrocchi@...>, <git@...>
Date: Wednesday, October 31, 2007 - 3:29 pm

* Jan Hudec <bulb@ucw.cz> [2007-10-30 20:36:10 +0100]:

I don't think the

  '+' is quoting for ' '

part is fully correct, at least not if you're talking about
"real RFC 2396 URLs" (not "Git URLs").  I might misunderstand
you here, but there has also been other postings suggesting
that plus should/could be used instead of space, implying that
people think that pluses are always transformed to spaces in
URLs.  But if I understand RFC 2396 correctly, this is *not*
the case.

RFC 2396 says that pluses are treated as "reserved" in the
*query* part of the URL (ie on the right side of the question
mark) -- here they *are* transformed to spaces, although the
RFC itself doesn't really say specifically what happens to
them.  In the path part, pluses are not "reserved", they are
simply a "pchar" along with "unreserved", "escaped" and a
couple of other characters.  There is nothing in the RFC
implying that pluses in the path part will be transformed into
spaces, and in my experience this does not happen in practice
either.

To recap:

  (In the examples below <...> is used to mean legal URLs,
  while "..." is used to mean "the literal characters in the
  URL" (more or less))

  * In the query part:

      '%20' = '+' = a literal space
      '%2B' =       a literal plus

    For example:

        <http://example.com/somescript?v=x%20y>
      = <http://example.com/somescript?v=x+y>
      = "http://example.com/somescript?v=x y"

        <http://example.com/somescript?v=x%2By>
      = "http://example.com/somescript?v=x+y"

  * In the path part:

      '%20' =       a literal space
      '%2B' = '+' = a literal plus

    For example:

        <http://example.com/x%20y.html>
      = "http://example.com/x y.html"

        <http://example.com/x%2By>
      = <http://example.com/x+y>
      = "http://example.com/x+y"

I'm not advocating that "Git URLs" necessarily should be made
fully RFC 2396 compliant (neither am I nitpicking just for the
sake of nitpicking), I'm just pointing out that if someone
*should* want to make "Git URLs" fully or more RFC 2396
compliant in some way for some reason, having pluses being
automatically transformed to spaces in the path part of the URL
does not follow the RFC (as far as I understand it).

-- 
Erik Warendorph <erik@warendorph.org>
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Git homepage: remove all the references to Cogito, Paolo Ciarrocchi, (Mon Oct 15, 5:38 pm)
Re: [PATCH] Git homepage: remove all the references to Cogito, Paolo Ciarrocchi, (Tue Oct 16, 4:01 am)
Re: [PATCH] gitweb: Speed up get_projects_list for large sou..., Andreas Ericsson, (Tue Oct 16, 12:55 pm)
cogito and remote#branch, was Re: [PATCH] Git homepage: remo..., Johannes Schindelin, (Tue Oct 16, 6:49 am)
Re: remote#branch, Jan Hudec, (Tue Oct 16, 5:09 pm)
Re: remote#branch, Johannes Schindelin, (Tue Oct 16, 5:35 pm)
Re: remote#branch, Jan Hudec, (Sat Oct 27, 4:47 pm)
Re: remote#branch, Johannes Schindelin, (Sat Oct 27, 7:01 pm)
Re: remote#branch, Jan Hudec, (Mon Oct 29, 1:40 pm)
Re: remote#branch, Johannes Schindelin, (Mon Oct 29, 2:32 pm)
Re: remote#branch, Linus Torvalds, (Mon Oct 29, 2:17 pm)
Re: remote#branch, Theodore Tso, (Mon Oct 29, 5:49 pm)
Re: remote#branch, Linus Torvalds, (Mon Oct 29, 6:57 pm)
Re: remote#branch, Johannes Schindelin, (Mon Oct 29, 7:49 pm)
Re: remote#branch, Theodore Tso, (Mon Oct 29, 11:01 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 12:50 am)
Re: remote#branch, Junio C Hamano, (Mon Oct 29, 11:40 pm)
Re: remote#branch, Theodore Tso, (Tue Oct 30, 12:40 am)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 12:51 am)
Re: remote#branch, Martin Langhoff, (Tue Oct 30, 8:41 pm)
Re: remote#branch, Jeff King, (Tue Oct 30, 9:43 pm)
Re: remote#branch, Johannes Schindelin, (Tue Oct 30, 11:08 pm)
Re: remote#branch, Martin Langhoff, (Tue Oct 30, 9:49 pm)
Re: remote#branch, Jeff King, (Tue Oct 30, 9:59 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 8:59 pm)
Re: remote#branch, Johannes Schindelin, (Tue Oct 30, 6:02 am)
Re: remote#branch, Tom Prince, (Tue Oct 30, 1:37 am)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 10:59 am)
Re: remote#branch, Jan Hudec, (Tue Oct 30, 3:36 pm)
Re: remote#branch, Erik Warendorph, (Wed Oct 31, 3:29 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 3:53 pm)
Re: remote#branch, Tom Prince, (Tue Oct 30, 12:02 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 1:39 pm)
Re: remote#branch, Matthieu Moy, (Tue Oct 30, 1:49 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 1:58 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 2:19 pm)
Re: remote#branch, Pascal Obry, (Tue Oct 30, 3:18 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 3:38 pm)
Re: remote#branch, Jeff King, (Tue Oct 30, 7:58 pm)
Re: remote#branch, Petr Baudis, (Wed Oct 31, 1:13 pm)
Re: remote#branch, David Kastrup, (Wed Oct 31, 2:39 am)
Re: remote#branch, Pascal Obry, (Wed Oct 31, 5:34 am)
Re: remote#branch, Robin Rosenberg, (Wed Oct 31, 4:25 am)
Re: remote#branch, Wincent Colaiuta, (Wed Oct 31, 4:16 am)
Re: remote#branch, Randal L. Schwartz, (Tue Oct 30, 4:15 pm)
Re: remote#branch, Nicolas Pitre, (Tue Oct 30, 4:36 pm)
Re: remote#branch, Linus Torvalds, (Tue Oct 30, 4:30 pm)
Re: remote#branch, Pascal Obry, (Tue Oct 30, 3:15 pm)
speck-geostationary