Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last-Modified header added twice (once by Warp) #17

Open
creichert opened this issue Jul 3, 2018 · 1 comment
Open

Last-Modified header added twice (once by Warp) #17

creichert opened this issue Jul 3, 2018 · 1 comment

Comments

@creichert
Copy link

creichert commented Jul 3, 2018

I noticed today that on a few of my apps, I was receiving the Last-Modified header twice (and the Vary header).

I pinned down a change that is the reason this header is displayed twice to this line of code.

Which lead me down a rabbit hole trying to determine:

I am going to dig into this issue a bit more and hopefully come up with a patch. However, I wanted to see if anyone has seen anything like this before? Am I missing some communication that happens between the middleware and Warp that informs Warp not to read this file again?


Not locally reproducible, but here is one service I have up which does this:

$ curl 'https://assertible.com/css/commons.cce252e7dd827e502280.css' -D - -o/dev/null -s
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-transform,public,max-age=300,s-maxage=900
Content-Type: text/css
Date: Tue, 03 Jul 2018 18:35:24 GMT
ETag: d34c427941055bdfa2009d02b89701c2ae1bccd1
Last-Modified: Wed, 27 Jun 2018 22:36:59 GMT
Last-Modified: Wed, 27-Jun-2018 22:36:59 UTC
Server: nginx/1.8.1
Vary: Accept-Encoding
Vary: Accept-Encoding
Content-Length: 105282
Connection: keep-alive
@creichert
Copy link
Author

Additionally, looking through wai-app-static, it seems they don't add Last-Modified there:
https://github.com/yesodweb/wai/blob/7819ee605324496e31fd86408e521dc0f484744a/wai-app-static/Network/Wai/Application/Static.hs#L244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant