[Spice-devel] [spice-gtk 2/5] session: Lookup URI query part before path part

Uri Lublin uril at redhat.com
Wed Jun 5 01:15:47 PDT 2013


On 06/04/2013 05:19 PM, Christophe Fergeau wrote:
> When parsing an URI, spice_uri_parse currently first looks up for
> '/' to detect the 'path' part of the URI
> (http://foo.example.com/some/path) and then the query part (starting
> with '&' is looked up).
> However, this does not work as expected when the host name is not
> followed by a path, but the query part contains a path:
> http://foo.example.com&my_param=/some/path

Why is that syntax more simple/intuitive/expressive than the current 
syntax ?
Isn't  "http://foo.example.com/?my_param=/some/path" equivalent ?

> This commit starts inverts the path detection/query detection step,
> it first detects the beginning of the query part and splits it out,
> and then looks for '/' in the part which came before the query part.
>



More information about the Spice-devel mailing list