pages-server/server/upstream
Peter Gerber 59adfc2251
Use correct timestamp format for Last-Modified header
HTTP uses GMT [1,2] rather than UTC as timezone for timestamps. However,
the Last-Modified header used UTC which confused at least wget.

Before, UTC was used:

$ wget --no-check-certificate -S --spider https://cb_pages_tests.localhost.mock.directory:4430/images/827679288a.jpg
...
  Last-Modified: Sun, 11 Sep 2022 08:37:42 UTC
...
Last-modified header invalid -- time-stamp ignored.
...

After, GMT is used:

$ wget --no-check-certificate -S --spider https://cb_pages_tests.localhost.mock.directory:4430/images/827679288a.jpg
...
  Last-Modified: Sun, 11 Sep 2022 08:37:42 GMT
...
(no last-modified-header-invalid warning)

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
[2]: https://www.rfc-editor.org/rfc/rfc9110#name-date-time-formats

Fixes #364
2024-07-15 21:39:23 +00:00
..
domains.go Add config file and rework cli parsing and passing of config values (#263) 2024-02-15 16:08:29 +00:00
header.go Use correct timestamp format for Last-Modified header 2024-07-15 21:39:23 +00:00
helper.go Add cert store option based on sqlite3, mysql & postgres (#173) 2023-02-10 03:00:14 +00:00
redirects.go Avoid extra slashes in redirects with :splat (#308) 2024-04-20 11:00:15 +00:00
redirects_test.go Avoid extra slashes in redirects with :splat (#308) 2024-04-20 11:00:15 +00:00
upstream.go FIX blank internal pages (#164) (#292) 2024-02-26 22:21:42 +00:00