Opened 6 years ago

Last modified 13 months ago

#779 new defect

hyde: support trailing slashes on directories

Reported by: retroj Owned by:
Priority: major Milestone:
Component: extensions Version: 4.7.x
Keywords: Cc:
Estimated difficulty: trivial


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:


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)

hyde-trailing-slashes-fix-1.patch (460 bytes) - added by retroj 6 years ago.
patch to page-by-path fixing trailing-slashes handling

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by retroj

patch to page-by-path fixing trailing-slashes handling

comment:1 Changed 5 years ago by felix

  • Milestone 4.8.0 deleted

comment:2 Changed 13 months ago by sjamaan

  • Estimated difficulty set to trivial
Note: See TracTickets for help on using tickets.