github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2017-02-21 06:31 pm

[dreamwidth/dw-free] 7400b9: additional headers for media file requests

Branch: refs/heads/develop
Home: https://github.com/dreamwidth/dw-free
Commit: 7400b91371eecaf4e604b2085d35a05c72dfc5a5
https://github.com/dreamwidth/dw-free/commit/7400b91371eecaf4e604b2085d35a05c72dfc5a5
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-02-21 (Tue, 21 Feb 2017)

Changed paths:
M cgi-bin/DW/Controller/Media.pm
M cgi-bin/DW/Routing.pm

Log Message:
-----------
additional headers for media file requests

Discussion with @alierak led to the conclusion that media files
should use the Cache-Control and Last-Modified headers.

Inspection of Apache/LiveJournal.pm and Apache/BML.pm indicates
that Cache-Control should be applied to all user content responses,
so we make that the new default behavior for user content in DW/Routing.pm.

The Last-Modified header is set in the media file controller as the
upload date of the file, which will never change.

Without the Last-Modified header, the image may be redownloaded
unnecessarily. Without the Cache-Control header, Cloudflare
caching may interfere with the ability to load the image correctly.


Commit: 8410894ea119c8fe13b0ccb88db949c9ece082f9
https://github.com/dreamwidth/dw-free/commit/8410894ea119c8fe13b0ccb88db949c9ece082f9
Author: Mark Smith <mark@qq.is>
Date: 2017-02-21 (Tue, 21 Feb 2017)

Changed paths:
M cgi-bin/DW/Controller/Media.pm
M cgi-bin/DW/Routing.pm

Log Message:
-----------
Merge pull request #2003 from kareila/media-headers

additional headers for media file requests


Compare: https://github.com/dreamwidth/dw-free/compare/ecba2a889335...8410894ea119

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org