New submission from Myk Melez <m...@mozilla.org>:

RFC 2368 <http://www.ietf.org/rfc/rfc2368.txt> specifies mailto: URLs as
having the following syntax:

     mailtoURL  =  "mailto:"; [ to ] [ headers ]
     to         =  #mailbox
     headers    =  "?" header *( "&" header )
     header     =  hname "=" hvalue
     hname      =  *urlc
     hvalue     =  *urlc

The header fields in these URLs are roughly analogous to query
parameters in other URLs, but urlparse treats them as part of the path
(along with the email address):

>>> import urlparse
>>> urlparse.urlparse("mailto:f...@example.com?subject=hi";)
ParseResult(scheme='mailto', netloc='',
path='f...@example.com?subject=hi', params='', query='', fragment='')

It should treat them as query parameters instead, which would not only
make it easier to access them but would also make it easier to access
the email address, since one would no longer have to parse headers, if
any, out of the path first.

----------
components: Library (Lib)
messages: 91249
nosy: mykmelez
severity: normal
status: open
title: urlparse should parse mailto: URL headers as query parameters
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to