happstack-server 6.1.4 → 6.1.5
raw patch · 2 files changed
+3/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
happstack-server.cabal view
@@ -1,5 +1,5 @@ Name: happstack-server-Version: 6.1.4+Version: 6.1.5 Synopsis: Web related tools and services. Description: Happstack Server provides an HTTP server and a rich set of functions for routing requests, handling query parameters, generating responses, working with cookies, serving files, and more. For in-depth documentation see the Happstack Crash Course <http://happstack.com/docs/crashcourse/index.html> License: BSD3
src/Happstack/Server/FileServe/BuildingBlocks.hs view
@@ -58,7 +58,7 @@ import Happstack.Server.Response (ToMessage(toResponse), ifModifiedSince, forbidden, ok, seeOther) import Happstack.Server.Types (Length(ContentLength), Request(rqPaths, rqUri), Response(SendFile), RsFlags(rsfLength), nullRsFlags, result, resultBS, setHeader) import System.Directory (doesDirectoryExist, doesFileExist, getDirectoryContents, getModificationTime)-import System.FilePath ((</>), addTrailingPathSeparator, joinPath, takeExtension)+import System.FilePath ((</>), addTrailingPathSeparator, joinPath, splitDirectories, takeExtension) import System.IO (IOMode(ReadMode), hFileSize, hClose, openBinaryFile, withBinaryFile) import System.Locale (defaultTimeLocale, rfc822DateFormat) import System.Log.Logger (Priority(DEBUG), logM)@@ -342,7 +342,7 @@ -> m Response fileServe' serveFn mimeFn indexFn localpath = do rq <- askRq- let safepath = filter (\x->not (null x) && x /= ".." && x /= ".") (rqPaths rq)+ let safepath = filter (\x->not (null x) && x /= ".." && x /= ".") $ splitDirectories $ joinPath (rqPaths rq) fp = joinPath (localpath:safepath) fe <- liftIO $ doesFileExist fp de <- liftIO $ doesDirectoryExist fp