[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] URL quoting issue
From:       Robert Clark <Robert.Clark () quest ! com>
Date:       2004-09-14 23:14:11
Message-ID: 1095203651.28673.12.camel () tor106065 ! quest ! com
[Download RAW message or body]

On Tue, 2004-09-14 at 19:09, Christian Parpart wrote:
> well, this is a rather odd problem I actually have.
> So, I must be able to get arguments containing a # as argument value, e.g.
> 
[ snip ]
> 
> So, finally I got it by URL encoding the '#' into a "%23", but my question now 
> is, WHAT chars "are declared to be invalid" in URL arguments, and though, 
> "has to be" encoded in the well known way?

RFC 1738 defines how URLs are to be encoded. It has the following paragraphs:

   Characters can be unsafe for a number of reasons.  The space
   character is unsafe because significant spaces may disappear and
   insignificant spaces may be introduced when URLs are transcribed or
   typeset or subjected to the treatment of word-processing programs.
   The characters "<" and ">" are unsafe because they are used as the
   delimiters around URLs in free text; the quote mark (""") is used to
   delimit URLs in some systems.  The character "#" is unsafe and should
   always be encoded because it is used in World Wide Web and in other
   systems to delimit a URL from a fragment/anchor identifier that might
   follow it.  The character "%" is unsafe because it is used for
   encodings of other characters.  Other characters are unsafe because
   gateways and other transport agents are known to sometimes modify
   such characters. These characters are "{", "}", "|", "\", "^", "~",
   "[", "]", and "`".

   All unsafe characters must always be encoded within a URL. For
   example, the character "#" must be encoded within URLs even in
   systems that do not normally deal with fragment or anchor
   identifiers, so that if the URL is copied into another system that
   does use them, it will not be necessary to change the URL encoding.


You can read the full spec (including a BNF description of the syntax) here:
<http://www.rfc-editor.org/rfc/rfc1738.txt>


---------------------------------------------------------------------
To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
For additional commands, e-mail: apache-modules-help@covalent.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic