snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

No handler accepted for Heist templates on Windows #202

Open seinokatsuhiro opened 6 years ago

seinokatsuhiro commented 6 years ago

On Windows, when Heist templates are in directories like templates\a\b.tpl, I got a response

No handler accepted "/a/b"

Snap.Snaplet.HeistNoClass.serveURI creates \-joined paths (on Windows) using getSafePath. It seems these paths are not matched with template paths. Should serveURI return /-joined paths?

(I run the snapframwork with Windows 10, LTS Haskell 11.10, snap-1.1.0.0, snap-core-1.0.3.2 and heist-1.0.1.2.)

mightybyte commented 6 years ago

I'm not quite sure what the right solution is here. My default assumption would be that using getSafePath is the right thing and that the problem lies somewhere else. We do want to support Windows, but I don't have a Windows machine and don't know anyone else who does, so I'm going to need more help to get this issue fixed. A fully self contained repo or gist that reproduces the problem would help, and once we get to a solution I'll need help from you testing it.