Hi!
I believe that urllib decided that query is something specific to
http/https.
You can probably dig the RFCs to discover why, or parse the url without the
scheme:
urlparse('//server/download/0000?b=a')
*ParseResult(scheme='', netloc='server', path='/download/0000', params='',
query='b=a', fragment='')*
Udi.
On Thu, May 5, 2011 at 1:54 PM, Ahik Man <[email protected]> wrote:
> Hi,
>
> While trying to use urlparse lib, I encounter unexpeted behavior. It's
> happened when parsing non trivial url scheme.
> For example:
>
> from urlparse import urlparse
> p_url = urlparse('abc://server/download/0000?b=a')
>
> In the above code, 'p_url' suppose to have 'b=a' in the p_url.query, but it
> put it in the path.
>
> The same happened to urlsplit.
>
> Am I doing something wrong or it's a bug?
>
> Ahik
>
> _______________________________________________
> Python-il mailing list
> [email protected]
> http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
>
>
_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il