Opened 10 years ago

Closed 7 months ago

#1920 defect closed invalid (invalid)

dav.resource.py: RedirectResponse takes a full href, not a uri

Reported by: karpet Owned by:
Priority: normal Milestone:
Component: web2 Keywords:
Cc: exarkun Branch:
Author:

Description

--- resource.py (revision 17515)
+++ resource.py (working copy)
@@ -469,7 +469,7 @@
         # If this is a collection and the URI doesn't end in "/", redirect.
         #
         if self.isCollection() and request.uri[-1:] != "/":
-            return RedirectResponse(request.uri + "/")
+            return RedirectResponse(request.unparseURL(path=request.uri + "/"))

         def setHeaders(response):
             response = IResponse(response)

Change History (4)

comment:1 Changed 9 years ago by rfmohr@…

Is there any chance that this fix will be merged in soon? The current implementation violates the spec, and the patch above easily fixes the problem.

(I just spent a couple of hours tracking down some weird behavior, and I finally isolated it to this problem. The behavior is only triggered in certain fringe cases, but fixing this bug might save others some time in the future.)

comment:2 Changed 9 years ago by exarkun

  • Cc exarkun added

Supplying a unit test which fails without this fix will speed up its acceptance.

Otherwise, this'll get applied when someone else finds the time to figure out how to trigger the bad behavior and then writes a unit test for it and verifies this patch fixes the problem.

comment:3 Changed 5 years ago by <automation>

  • Owner jknight deleted

comment:4 Changed 7 months ago by hawkowl

  • Resolution set to invalid
  • Status changed from new to closed

web2 does not exist anymore, so, batch-closing these as invalid.

Note: See TracTickets for help on using tickets.