From: Martin Duerst Date: 2008-10-30T16:17:49+09:00 Subject: [ruby-core:19630] Re: Net::HTTP.post_form bug : can't post form to correct uri which contains QueryString(QueryString part are lost) and revise Some datapoints: RFC 2616 is currently under revision in the httpbis WG in the IETF. The question of what is a resource has been brought up and assigned a ticket/issue number (see http://trac.tools.ietf.org/wg/httpbis/trac/ticket/58). The proposed text includes an optional query part. Also, there is a ticket for updating the references to the newest version of the URI spec (http://trac.tools.ietf.org/wg/httpbis/trac/ticket/34). Please note that there is a significant overlap between the people working on the HTTP spec(s) and the people who worked on the URI spec. Also, the URI spec is a (full) IETF Standard, whereas the HTTP spec is still at Draft Standard, being revised to hopefully become a full standard (see http://www.rfc-editor.org/cgi-bin/rfcsearch.pl). Hope this helps, Martin. At 01:16 08/10/26, mathew wrote: >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 #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp