Opened 8 years ago

Closed 8 years ago

#1874 defect closed fixed (fixed)

urlForResource() returns wrong URL for nested resources (eg, /foo/bar/baz)

Reported by: wsanchez Owned by: wsanchez
Priority: highest Milestone:
Component: web2 Keywords: dav
Cc: wsanchez Branch:
Author: Launchpad Bug:

Description

When looking up a resource that's a couple of levels down in the URL namespace, urlForResource() fails to work. Looks like _handleSegment is registering each segment rather than the full path, which is not nice at all.

Change History (8)

comment:1 Changed 8 years ago by wsanchez

  • Keywords review added

comment:2 Changed 8 years ago by wsanchez

Fixed on branch: urlForResource-1874

comment:3 Changed 8 years ago by wsanchez

Passed on buildbot: full-2.3, OS X, win32er

comment:4 Changed 8 years ago by wsanchez

  • Type changed from enhancement to defect

comment:5 Changed 8 years ago by wsanchez

  • Owner changed from wsanchez to glyph

comment:6 Changed 8 years ago by glyph

  • Owner changed from glyph to wsanchez

Fix before merging:

  • remove spurious whitespace added in test_server.py line 357.
  • neither test_requestedResource and test_deepResource has a docstring explaining what is being tested.

Other:

  • _handleSegment could stand to be a bit better documented; it's pretty complex, but there's no description of its inputs or outputs.

Otherwise looks good.

comment:7 Changed 8 years ago by glyph

  • Keywords review removed

comment:8 Changed 8 years ago by wsanchez

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

(In [17431]) Fix urlForResource() for nested resources.
Author: wsanchez
Reviewed by glyph
Fixes #1874

Note: See TracTickets for help on using tickets.