on master help sign in
Not Found is 404, not 400.
8590e0dJasper Van der Jeugt
src/Network/Hakyll/SimpleServer.hs+1−1
@@ -73,7 +73,7 @@ createGetResponse request = do
73 else B.unpack (requestURI request)
73 else B.unpack (requestURI request)
74 exists <- doesFileExist fileName
74 exists <- doesFileExist fileName
75 if exists then catch (create200 fileName) create500
75 if exists then catch (create200 fileName) create500
76− else return $ errorResponse 400 (B.pack "Not Found")
76+ else return $ errorResponse 404 (B.pack "Not Found")
77 where create200 fileName = do
77 where create200 fileName = do
78 body <- B.readFile fileName
78 body <- B.readFile fileName
79 let headers = [ (B.pack "Content-Length", B.pack $ show $ B.length body)
79 let headers = [ (B.pack "Content-Length", B.pack $ show $ B.length body)