on master help sign in
adding doctests.
commit9859251d47040284f65e36a05ef80b4b8f2655ec authorKazu Yamamoto <kazu@iij.ad.jp> dateFri 1 Nov 2013, 13:41 (13 years ago) parent839a757
1 file changed+12
warp/Network/Wai/Handler/Warp/RequestHeader.hs+12
warp/Network/Wai/Handler/Warp/RequestHeader.hs+12
@@ -51,6 +51,18 @@ parseRequestLine s =
5151
5252----------------------------------------------------------------
5353
54+-- |
55+--
56+-- >>> parseRpath ""
57+-- "/"
58+-- >>> parseRpath "http://example.com/path"
59+-- "/path"
60+-- >>> parseRpath "http://example.com"
61+-- ""
62+-- >>> parseRpath "/path"
63+-- "/path"
64+
65+-- FIXME: parseRpath "http://example.com" should be "/"?
5466parseRpath :: ByteString -> ByteString
5567parseRpath path
5668 | S.null path = "/"