--- Log opened Sun Nov 01 00:00:33 2009
10:56 < stepcut> if you pronounce happstack with three symbols you can get, 'happystack' ;)
11:32 < stepcut> yay! Fixed all the broken links on happstack.com (aside from the temporary outage of hackage :p )
11:32 < stepcut> sadly, happstack.com is still served by apache :(
11:33 < stepcut> and is xhtml 1.1 instead of html :(
11:33 < stepcut> but, I would prefer to fix both of those issues at the same time :p
11:35 < stepcut> actually, I didn't remove the link to buildbot.happstack.com, but perhaps I should..
14:22 < McManiaC> stepcut: nice
17:49 < McManiaC> btw, is there a way in the new 0.4 version to differntiate between urls like "/foo" and "/foo/" ?
17:49 < McManiaC> or this is still unfixed?
17:51 < stepcut> depends on what you mean
17:51 < stepcut> you can do,  last (rqUri rq) == '/', to see if the incoming request ended in '/'
17:52 < stepcut> but 'dir' still has no way to tell
17:52 < McManiaC> ok
18:01 < aavogt> is that a difficulty seen using other frameworks too?
18:03 < stepcut> the issue is just that the correct behavior has not be properly specified
18:03 < McManiaC> stepcut: why did you remove exactDir btw?
18:05 < stepcut> didn't exactdir come from happstack-helpers?
18:05 < McManiaC> hm no idea
18:05 < McManiaC> maybe
18:05 < McManiaC> ^^
18:06 < stepcut> I think it was never added to happstack-server because you can just do, dir "foo" $ do { methodM GET  ; ... }
18:07 < McManiaC> this would match /foo/ ?
18:07 < stepcut> McManiaC: no, exactDir is different
18:07 < stepcut> +exactDir :: (ServerMonad m, MonadPlus m) => String -> m a -> m a
18:07 < stepcut> +exactDir staticPath handle = dir staticPath (nullDir >> handle)
18:08 < stepcut> McManiaC: dir matches on 'foo' or 'foo/', if you want to distinguish between the two, then you need to tell us what the functions should look like that do that
18:08 < McManiaC> eh
18:09 < stepcut> since the only '/' we care about is the last one, maybe just something like: isDir :: (ServerMonad m, MonadPlus m) => m () ; isDir = guardRq $ \rq -> last (rqUri rq) == '/'
18:09 < stepcut>  ?
18:10 < McManiaC> http://paste.n-sch.de/1K/hs line 127
18:10 < McManiaC> no wiat
18:10 < McManiaC> wait
18:10 < McManiaC> ^
18:11 < McManiaC> stepcut: maybe that would do
18:11 < McManiaC> i guess
18:11 < McManiaC> ^^
18:15 < stepcut> ?
18:19 < McManiaC> hmmm nope
18:19 < McManiaC> doesnt seem to work
18:19 < McManiaC> how do i use this?
18:19 < McManiaC> do { isDir ; doSomething } ?
18:19 < stepcut> yeah
18:20 < McManiaC> no difference between /foo/ and /foo =(
18:20 < stepcut> in what context ?
18:23 < McManiaC> showPaste id = (...) msum [ path (showWithSyntax paste), showPlain paste ]
18:24 < stepcut> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11447#a11447
18:24 < stepcut> that works for me
18:24 < McManiaC> hmmm what is dir O.o
18:24 < McManiaC> mom
18:24 < McManiaC> ^^
18:25 < stepcut> dir matches on path components, like, http://localhost/foo/bar, would be matched on by, dir "foo" $ dir "bar" $ do ...
18:26 < McManiaC> hm ok, but if "foo" can be anything, dir and path should act the same?
18:26 < McManiaC> not act the same but...
18:26 < McManiaC> meh
18:26 < McManiaC> ^^
18:28 < McManiaC> let me try something
18:28 < McManiaC> aaah <3
18:28 < McManiaC> thx
18:28 < McManiaC> its working
18:29 < stepcut> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11447#a11448
18:29 < stepcut> ok, I'll add isDir to SimpleHTTP, but maybe with a better name
18:34 < McManiaC> hehe
18:34 < McManiaC> <3
21:05 < stepcut> ok, pushed a patch with trailingSlashing (formerly known as isDir)
--- Log closed Mon Nov 02 00:00:34 2009