[PATCH] skip apply "ngx_http_upstream_process_accel_expires" when a request responeded by cache
Maxim Dounin
mdounin at mdounin.ru
Thu Jun 25 08:56:43 UTC 2020
Hello!
On Wed, Jun 24, 2020 at 08:32:18PM +0900, Sokichi Takada wrote:
> In my case, the backend returns x-accel-expires with 304 responses every
> time.
>
> nginx calculates valid_sec by "ngx_http_upstream_process_accel_expires" for
> any revalidate or HIT responses, thus to get the wrong valid_sec value in
> header_filter/log hook handler.
> This patch has no impact to every response results, and to be able to get
> TRUE valid_sec value in the hook handlers.
No doubt the patch is working for you. But the patch breaks other
valid use cases.
On the other hand, the only thing it expected to do is to set the
valid_sec field, which is unused by nginx itself in you particular
use case, to something you think is "TRUE" for your particular use
case.
Again, thank you for the patch, but no.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list