Ticket #1874 defect closed fixed

Opened 8 years ago

Last modified 8 years ago

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

1

Changed 8 years ago by wsanchez

  • keywords dav, review added; dav removed

2

Changed 8 years ago by wsanchez

Fixed on branch: urlForResource-1874

3

Changed 8 years ago by wsanchez

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

4

Changed 8 years ago by wsanchez

  • type changed from enhancement to defect

5

Changed 8 years ago by wsanchez

  • owner changed from wsanchez to glyph

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.

7

Changed 8 years ago by glyph

  • keywords dav added; dav, review removed

8

Changed 8 years ago by wsanchez

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.