Ticket #2235 defect closed duplicate
WebDAV copy fails if the name of the destination folder contains whitespace
| Reported by: | vincentk | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | web2 | Keywords: | |
| Cc: | wsanchez, exarkun | Branch: | |
| Author: | Launchpad Bug: |
Description
DESCRIPTION:
If the destination uri contains whitespace, d = request.locateResource(destination_uri) in twisted.web2.dav.method.copymove.prepareForCopy returns None, in which case twisted.web2.dav.method.copymove.prepareForCopy._prepareForCopy raises an HTTPError(StatusResponse(responsecode.CONFLICT, "No parent collection.").
ANALYSIS: Request.locateResource() in twisted/web2/server.py accepts a URI and returns the corresponding resource if one exists. However, it does not unquote the path component of the URI, and correspondingly fails if the path contains quoted characters.
FIX: replace segments = path.split("/") with segments = unquote(path).split("/")
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

