From a1203297b9eb268c7b0915f24a53811b17f8af8f Mon Sep 17 00:00:00 2001 From: Felipe Lessa Date: Thu, 17 May 2012 09:59:17 -0300 Subject: [PATCH] yesod-static: Correctly add the "etag" param to TH-generated routes. The wai-app-static package expects the etag parameter to be passed in the form of /...?etag=XXXX but yesod-static was passing /...?XXXX This commit fixes this bug. --- yesod-static/Yesod/Static.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-static/Yesod/Static.hs b/yesod-static/Yesod/Static.hs index 24df62c5..afe75859 100644 --- a/yesod-static/Yesod/Static.hs +++ b/yesod-static/Yesod/Static.hs @@ -307,7 +307,7 @@ mkStaticFilesList fp fs routeConName makeHash = do pack' <- [|pack|] qs <- if makeHash then do hash <- qRunIO $ base64md5File $ pathFromRawPieces fp f - [|[(pack $(lift hash), mempty)]|] + [|[("etag" :: Text, pack $(lift hash))]|] else return $ ListE [] return [ SigD routeName $ ConT route