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.
This commit is contained in:
Felipe Lessa 2012-05-17 09:59:17 -03:00
parent ef0a7f0518
commit a1203297b9

View File

@ -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