@@ -8,6 +8,7 @@ You want a minimal example? Here it is!
88
99> {-# LANGUAGE OverloadedStrings #-}
1010> import Network.Wai
11+> import Network.HTTP.Types
1112> import Network.Wai.Handler.Warp (run)
1213> import Data.ByteString.Lazy.Char8 () -- Just for an orphan instance
1314>
@@ -53,6 +54,7 @@ Now we redefine `responseBody` to refer to that file:
5354> status200
5455> [("Content-Type", "text/html")]
5556> "index.html"
57+> Nothing
5658
5759
5860Basic dispatching
@@ -67,7 +69,7 @@ Depending on the path info provided with each `Request` we can serve
6769different `Response`s:
6870
6971> app3 :: Application
70−> app3 request = case pathInfo request of
72+> app3 request = case rawPathInfo request of
7173> "/" -> return index
7274> "/raw/" -> return plainIndex
7375> _ -> return notFound
@@ -76,6 +78,7 @@ different `Response`s:
7678> status200
7779> [("Content-Type", "text/plain")]
7880> "index.html"
81+> Nothing
7982>
8083> notFound = responseLBS
8184> status404