diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-05-25 19:13:10 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-05-25 19:13:55 +0200 |
commit | b1d4f48d2422b3604f8f8851e2930f800f85dc2c (patch) | |
tree | 4c193f05397c9d0e46160530bfb7710aa0f7055b /src/Network/Hakyll/SimpleServer.hs | |
parent | eac0473a0bf61187e1fc356f37525503d5bff9eb (diff) | |
download | hakyll-b1d4f48d2422b3604f8f8851e2930f800f85dc2c.tar.gz |
Server allows URL's containing '?'.
Diffstat (limited to 'src/Network/Hakyll/SimpleServer.hs')
-rw-r--r-- | src/Network/Hakyll/SimpleServer.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/Hakyll/SimpleServer.hs b/src/Network/Hakyll/SimpleServer.hs index 4b4e7ee..f17c490 100644 --- a/src/Network/Hakyll/SimpleServer.hs +++ b/src/Network/Hakyll/SimpleServer.hs @@ -102,7 +102,8 @@ createGetResponse :: Request -> Server Response createGetResponse request = do -- Construct the complete fileName of the requested resource. config <- ask - let uri = requestURI request + let -- Drop everything after a '?'. + uri = takeWhile ((/=) '?') $ requestURI request log' = writeChan (logChannel config) isDirectory <- liftIO $ doesDirectoryExist $ documentRoot config ++ uri let fileName = |