Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert other Mason templates to new headers template
27bd738 created a single method in Web.pm, CacheControlExpiresHeaders to generate HTTP response headers, specifically those related to caching instructions for browsers. That was applied to Helpers, but wasn't used for regular RT pages. Later, 915eb4b sought to fix a regression that resulted in cache headers not being sent for static files returned via Plack::Middleware::Static. That fix went to great lengths to try to re-use functionality from CacheControlExpiresHeaders, including moving all of the code to GetStaticHeaders. This probably wasn't really needed since it's reasonable to allow the special case static handler to send it's own one or two headers. It also made the code confusing since dynamic pages in Mason called CacheControlExpiresHeaders, which then called GetStaticHeaders to get headers for responses that were not static. This update gets all of the Mason web pages using the same code for these headers. It leaves the current methods in place to continue handling static files. That can likely be simplified and cleaned up in a future commit.
- Loading branch information