Merge pull request #348 from meteficha/yesod-static-fix
yesod-static: Correctly add the "etag" param to TH-generated routes.
This commit is contained in:
commit
13c4e137a2
@ -307,7 +307,7 @@ mkStaticFilesList fp fs routeConName makeHash = do
|
|||||||
pack' <- [|pack|]
|
pack' <- [|pack|]
|
||||||
qs <- if makeHash
|
qs <- if makeHash
|
||||||
then do hash <- qRunIO $ base64md5File $ pathFromRawPieces fp f
|
then do hash <- qRunIO $ base64md5File $ pathFromRawPieces fp f
|
||||||
[|[(pack $(lift hash), mempty)]|]
|
[|[("etag" :: Text, pack $(lift hash))]|]
|
||||||
else return $ ListE []
|
else return $ ListE []
|
||||||
return
|
return
|
||||||
[ SigD routeName $ ConT route
|
[ SigD routeName $ ConT route
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user