From: mathew
Date: 2008-10-26T01:16:04+09:00
Subject: [ruby-core:19510] Re: Net::HTTP.post_form bug : can't post form to correct uri which contains QueryString(QueryString part are lost) and revise
On Sun, Oct 19, 2008 at 11:17, Tim Bray wrote:
> On Oct 19, 2008, at 8:55 AM, mathew wrote:
>> The specification for URIs is RFC3986, and the specification for HTTP
>> is RFC 2616.
>>
>> The previous version of the URI specification, RFC 2396, is clearer
>> about this issue. It says:
>
> Quoting from the top of RFC3986: "Obsoletes: 2732, 2396, 1808 "
Like I said, the previous version.
> 3.4. Query
>
> The query component contains non-hierarchical data that, along with
> data in the path component (Section 3.3), serves to identify a
> resource within the scope of the URI's scheme and naming authority
> (if any). The query component is indicated by the first question
> mark ("?") character and terminated by a number sign ("#") character
> or by the end of the URI.
Then RFC3986 contradicts RFC2616.
RFC2616 section 3.2.2:
The "http" scheme is used to locate network resources via the HTTP
protocol. This section defines the scheme-specific syntax and
semantics for http URLs.
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
If the port is empty or not given, port 80 is assumed. The semantics
are that the identified resource is located at the server listening
for TCP connections on that port of that host, and the Request-URI
for the resource is abs_path (section 5.1.2).
i.e. the HTTP spec specifically says that the resource's URI does not
include the query parameters.
> For what it's worth, RFC3986 was one of the most heavily-discussed and
> closely-examined specs in history.
Apparently not examined closely enough.
So, should Ruby obey the HTTP spec, or the URI spec?
mathew