Permalink
Browse files

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.
  • Loading branch information...
meteficha committed May 17, 2012
1 parent ef0a7f0 commit a1203297b9eb268c7b0915f24a53811b17f8af8f
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit a120329

Please sign in to comment.