RE: Bug report: using HTTP::Request::Common to send a POST reques

Schwartz, Todd (todd.schwartz@intel.com)
Mon, 21 Jun 1999 11:36:21 -0700


Gisle,

Thanks for your response.

> I guess you say this based on the fact that ";" is a "reserved"
> character, but as I read RFC 2396 it does not nessesary mean that it
> have to be escaped inside the http query components.  Quote:
> 
>    Characters in the "reserved" set are not reserved in all contexts.
>    The set of characters actually reserved within any given URI
>    component is defined by that component. In general, a character is
>    reserved if the semantics of the URI changes if the character is
>    replaced with its escaped US-ASCII encoding.
> 

The first paragraph in the section of your quote provides needed context:

   ...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.

In the case of a query string, the reserved purpose of the ";" character is
to delimit query components (as I am now aware). Therefore, a semicolon that
is not used for this purpose, such as the first one in the following query
string, should be escaped:

	TEXT="Clause+1;+clause+2.";PARM2="Value2"

Also, section 3.4. specifically addresses query components:

   Within a query component, the characters ";", "/", "?", ":", "@",
   "&", "=", "+", ",", and "$" are reserved.

Anyway, HTTP::Request::Common::POST does escape the "&" character if it
appears as text in a value string -- why should ";" be treated differently?

Thanks,
Todd