Martin Wendt
unread,Jul 11, 2009, 2:23:54 AM7/11/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Paste Users
Hi,
I recently picked up the Ho Cun Wei's work on PyFileServer (a WSGI
WebDAV server) and tried replace the existing standalone server with
paste.httpserver.
The litmus test emits a warning, because now the server accepts a
DELETE request on /a/b/c#frag to delete a resource that is mapped on /
a/b/c.
Seems that the fragment part of the URL is silently discarded, when
constructing PATH_INFO:
paste.httpserver
def wsgi_setup(self, environ=None):
"""
Setup the member variables used by this WSGI mixin,
including
the ``environ`` and status member variables.
After the basic environment is created; the optional
``environ``
argument can be used to override any settings.
"""
(scheme, netloc, path, query, fragment) = urlparse.urlsplit
(self.path)
path = urllib.unquote(path)
[...]
<path> is then used to set up PATH_INFO
Is this the correct behaviour (I didn't find it in the PEP)?
Otherwise I suggest to patch it like this:
(scheme, netloc, path, query, fragment) = urlparse.urlsplit
(self.path, allow_fragments=False)
Regards
Martin