Review main Abandoned

58562[BUGFIX] Fix HTTP response headers when tempContent is sent

Benni Mack CR 0 V 0 Easy +14 −4 updated 10/28/18, 11:56

Commit message

When the infamous "Page is being generated" message pops up,
there are HTTP headers sent which are wrong.

a) "Expire" includes a typo and should be called "Expires"
b) "Retry-after" => the client should re-check in 30 seconds not 3600sec
c) Since "Cache-control" only contains "no-cache" but not "private"
this means that any proxy is allowed to keep this information as well,
as they may obey the no-cache directive. (quote from rfc7234:
"Note: Although it has been back-ported to many implementations, some
HTTP/1.0 caches will not recognize or obey this [no-cache] directive.")
That would prevent the possibility for clients to manually refresh, forcing
them to wait for the proxy-to re-ask again. We use a similar construct
("private, no-strict") in another scenario, so this is a "nice-to-have"
fix, since "Expires: 0" should do the job already.

Some additional notes are also added in the comments.

The main fix is to not cache these 503 requests anymore.

Some references:

Header "Expires" not "Expire" - http://httpd.apache.org/docs/current/mod/mod_expires.html

Cache-Control:

https://docs.fastly.com/guides/tutorials/cache-control-tutorial#do-not-cache
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
https://sookocheff.com/post/api/effective-caching/

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1