Opened 11 years ago

Closed 11 years ago

#1874 defect closed fixed (fixed)

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

Reported by: Wilfredo Sánchez Vega Owned by: Wilfredo Sánchez Vega
Priority: highest Milestone:
Component: web2 Keywords: dav
Cc: Wilfredo Sánchez Vega Branch:
Author:

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 11 years ago by Wilfredo Sánchez Vega

Keywords: review added

comment:2 Changed 11 years ago by Wilfredo Sánchez Vega

Fixed on branch: urlForResource-1874

comment:3 Changed 11 years ago by Wilfredo Sánchez Vega

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

comment:4 Changed 11 years ago by Wilfredo Sánchez Vega

Type: enhancementdefect

comment:5 Changed 11 years ago by Wilfredo Sánchez Vega

Owner: changed from Wilfredo Sánchez Vega to Glyph

comment:6 Changed 11 years ago by Glyph

Owner: changed from Glyph to Wilfredo Sánchez Vega

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 11 years ago by Glyph

Keywords: review removed

comment:8 Changed 11 years ago by Wilfredo Sánchez Vega

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.