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:
parent
ef0a7f0518
commit
a1203297b9
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user