Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
defaultIndexGenerator - wrong directory links #121
Some time ago I spotted an issue within the directory serving functionality of snap while using hakyll. I actually had a directory structure generated (and served by snap) which was several levels deep.
I decided to investigate a little more what was going on and tried if I could reproduce this with a default snap installation. Using the snap api tutorial I could reproduce this behaviour.
routes :: [(ByteString, Handler App App ())] routes = [ ("/", index) , ("/echo/:stuff", echo) , ("", with heist heistServe) , ("", serveDirectory "resources/static") , ("r", serveDirectoryWith fancyDirectoryConfig "./") ]
Running the application and visiting (in my case) http://localhost:8000/r/ generated the same double slashes.
The following patch resulted in correct links for me.
I hope this helps and thank you very much in advance.
Keep up the great work.