Petite Abeille wrote:

On Nov 7, 2009, at 11:10 PM, Bertrand Mansion wrote:

I didn't see anything in both rfc that defines a standard way of
parsing the query parameters.

Well, HTTP doesn't have anything to say about the matter aside that it expects an URI.

URI doesn't have anything so say about it either, aside that it allows a trailing searchpart.

The 'name then equal sign then value then ampersand' convention is a W3C recommendation related to HTML.


The only thing that is RFCd is how to encode and decode the URL data as per RFC1738, section 2.2. Although I would disagree and call the official HTML spec a bit more then a W3C recommendation.

This is all academic because x-www-form-urlencoded is what ALL browsers use to submit HTML forms - which is one of the few ways that user data can be submitted on a website. But as to anything beyond section 8.2.1 of the HTML spec, I suppose there are only various traditions.

I agree that simply choosing a handy WSAPI way to parse anything beyond the basic standard HTML spec (so that browsers can communicate with WSAPI web apps) is quite agreeable.

That note 26 is a funny one, circa 1995. It appears that browsers decided to completely ignore it. And I don't think most internet users have ever escaped a URI by hand. So I wouldn't personally worry too much about it.

-----

Hypertext Markup Language - 2.0
Section 8.2.1

1. The form field names and values are escaped: space characters are replaced by `+', and then reserved characters are escaped as per [RFC1738]; that is, non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks, as in multi-line text field values, are represented as CR LF pairs, i.e. `%0D%0A'.

2. The fields are listed in the order they appear in the document with the name separated from the value by `=' and the pairs separated from each other by `&'. Fields with null values may be omitted. In particular, unselected radio buttons and checkboxes should not appear in the encoded data, but hidden fields with VALUE attributes present should. (note 26)

...

*(note 26) The URI from a query form submission can be used in a normal anchor style hyperlink. Unfortunately, the use of the `&' character to separate form fields interacts with its use in SGML attribute values as an entity reference delimiter. ...HTTP server implementors, and in particular, CGI implementors are encouraged to support the use of `;' in place of `&' to save users the trouble of escaping `&' characters this way.

-----


_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to