[PATCH 3/4] httpd: Support caching via 'ETag:' header
Xabier Oneca -- xOneca
xoneca at gmail.com
Sat Jul 11 15:45:49 UTC 2020
Hi Sergey,
Nice patch. Just one comment below:
[...]
> diff --git a/networking/httpd.c b/networking/httpd.c
> index 97b61fb77..50a837229 100644
> --- a/networking/httpd.c
> +++ b/networking/httpd.c
> @@ -1699,6 +1725,14 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
> send_headers_and_exit(HTTP_NOT_FOUND);
> log_and_exit();
> }
> +#if ENABLE_FEATURE_HTTPD_CACHE
> + if (DEBUG)
> + bb_perror_msg("Not modified '%s'", url);
> + if (modified_since == last_mod) {
> + send_headers_and_exit(HTTP_NOT_MODIFIED);
> + log_and_exit();
Here this log_and_exit() is redundant. It is already called from
send_headers_and_exit().
Cheers,
Xabier Oneca_,,_
More information about the busybox
mailing list