Opened 13 years ago
Last modified 15 months ago
#779 new defect
hyde: support trailing slashes on directories
Reported by: | John Foerch | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | someday |
Component: | extensions | Version: | 4.7.x |
Keywords: | Cc: | ||
Estimated difficulty: | trivial |
Description
hyde serve (hyde 0.15) fails to serve index content when the request url has a trailing slash on the end of the directory. For example, make a hyde project with a file like the following in the src/ dir:
about/index.wiki
Run hyde serve and try the following urls:
http://localhost:8080/about/index.html → OK
http://localhost:8080/about → OK
http://localhost:8080/about/ → FAIL
The problem is in the procedure 'page-by-path', which is called by 'serve' to find the page object for the given uri path. In the case where the directory has a trailing slash, the path object (a list that was returned by 'uri-path') has as its last term an empty string, and page-by-path fails to deal with this.
A patch showing one way to fix this is attached.
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | hyde-trailing-slashes-fix-1.patch added |
---|
comment:1 Changed 13 years ago by
Milestone: | 4.8.0 |
---|
comment:2 Changed 8 years ago by
Estimated difficulty: | → trivial |
---|
comment:3 Changed 15 months ago by
Milestone: | → someday |
---|
patch to page-by-path fixing trailing-slashes handling