diff --git a/snap-core.cabal b/snap-core.cabal
--- a/snap-core.cabal
+++ b/snap-core.cabal
@@ -1,5 +1,5 @@
 name:           snap-core
-version:        0.9.6.3
+version:        0.9.6.4
 synopsis:       Snap: A Haskell Web Framework (core interfaces and types)
 
 description:
@@ -137,7 +137,7 @@
     bytestring                >= 0.9     && < 0.11,
     case-insensitive          >= 0.3     && < 1.3,
     containers                >= 0.3     && < 1.0,
-    deepseq                   >= 1.1     && < 1.4,
+    deepseq                   >= 1.1     && < 1.5,
     directory                 >= 1       && < 2,
     enumerator                >= 0.4.15  && < 0.5,
     filepath                  >= 1.1     && < 2.0,
@@ -147,8 +147,8 @@
     mtl                       >= 2.0     && < 2.3,
     random                    >= 1       && < 2,
     regex-posix               >= 0.95    && < 1,
-    text                      >= 0.11    && < 1.2,
-    time                      >= 1.0     && < 1.5,
+    text                      >= 0.11    && < 1.3,
+    time                      >= 1.0     && < 1.6,
     unix-compat               >= 0.2     && < 0.5,
     unordered-containers      >= 0.1.4.3 && < 0.3,
     vector                    >= 0.6     && < 0.11,
diff --git a/src/Snap/Internal/Parsing.hs b/src/Snap/Internal/Parsing.hs
--- a/src/Snap/Internal/Parsing.hs
+++ b/src/Snap/Internal/Parsing.hs
@@ -302,7 +302,7 @@
     unEncoded :: Char -> DList ByteString -> Parser (DList ByteString)
     unEncoded !c !l' = do
         let l = l' . ((S.singleton c) :)
-        bs   <- takeTill (flip elem "%+")
+        bs   <- takeTill (flip elem ['%', '+'])
         if S.null bs
           then nextChunk l
           else nextChunk $ l . (bs :)
@@ -354,8 +354,9 @@
 urlEncodeTable :: FastSet
 urlEncodeTable = generateFS f
   where
-    f c = any ($ (w2c c)) [isAlphaNum, flip elem "$-.!*'(),"]
-
+    f c = any ($ (w2c c)) [isAlphaNum, flip elem [ '$', '_', '-', '.', '!'
+                                                 , '*' , '\'', '(', ')'
+                                                 , ',' ] ]
 
 ------------------------------------------------------------------------------
 hexd :: Char -> Builder
diff --git a/src/Snap/Internal/Types.hs b/src/Snap/Internal/Types.hs
--- a/src/Snap/Internal/Types.hs
+++ b/src/Snap/Internal/Types.hs
@@ -802,8 +802,8 @@
 ipHeaderFilter' header = do
     headerContents <- getHeader header <$> getRequest
 
-    let whitespace = " \t\r\n"
-        ipChrs = ".0123456789"
+    let whitespace = [ ' ', '\t', '\r', '\n' ]
+        ipChrs = [ '.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ]
         trim f s = f (`elem` s)
 
         clean = trim S.takeWhile ipChrs . trim S.dropWhile whitespace
diff --git a/src/Snap/Util/FileServe.hs b/src/Snap/Util/FileServe.hs
--- a/src/Snap/Util/FileServe.hs
+++ b/src/Snap/Util/FileServe.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE BangPatterns        #-}
 {-# LANGUAGE CPP                 #-}
 {-# LANGUAGE OverloadedStrings   #-}
 {-# LANGUAGE ScopedTypeVariables #-}
@@ -28,26 +27,26 @@
 import           Blaze.ByteString.Builder
 import           Blaze.ByteString.Builder.Char8
 import           Control.Applicative
-import           Control.Exception (SomeException, evaluate)
+import           Control.Exception              (SomeException, evaluate)
 import           Control.Monad
 import           Control.Monad.CatchIO
 import           Control.Monad.Trans
 import           Data.Attoparsec.Char8
-import qualified Data.ByteString.Char8 as S
-import           Data.ByteString.Char8 (ByteString)
-import           Data.ByteString.Internal (c2w)
+import           Data.ByteString.Char8          (ByteString)
+import qualified Data.ByteString.Char8          as S
+import           Data.ByteString.Internal       (c2w)
+import           Data.HashMap.Strict            (HashMap)
+import qualified Data.HashMap.Strict            as Map
 import           Data.Int
 import           Data.List
-import           Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as Map
-import           Data.Maybe (fromMaybe, isNothing)
+import           Data.Maybe                     (fromMaybe, isNothing)
 import           Data.Monoid
-import qualified Data.Text as T
-import qualified Data.Text.Encoding as T
+import qualified Data.Text                      as T
+import qualified Data.Text.Encoding             as T
 #if MIN_VERSION_base(4,6,0)
-import           Prelude hiding (show, Show)
+import           Prelude                        hiding (Show, show)
 #else
-import           Prelude hiding (catch, show, Show)
+import           Prelude                        hiding (Show, catch, show)
 #endif
 import qualified Prelude
 import           System.Directory
@@ -57,7 +56,7 @@
 import           Snap.Core
 import           Snap.Internal.Debug
 import           Snap.Internal.Parsing
-import           Snap.Iteratee hiding (drop)
+import           Snap.Iteratee                  hiding (drop)
 
 
 ------------------------------------------------------------------------------
@@ -69,7 +68,7 @@
     req <- getRequest
     let mp = urlDecode $ rqPathInfo req
 
-    p <- maybe pass (return . S.unpack) mp
+    p <- maybe pass (return . T.unpack . T.decodeUtf8) mp
 
     -- relative paths only!
     when (not $ isRelative p) pass
