[PATCH 3/4] httpd: Don't add Last-Modified header to response
Denys Vlasenko
vda.linux at googlemail.com
Sat Aug 15 21:28:21 UTC 2020
On Sun, Aug 9, 2020 at 12:24 AM Sergey Ponomarev <stokito at gmail.com> wrote:
> */
> static void send_headers(unsigned responseNum)
> {
> +#if ENABLE_FEATURE_HTTPD_DATE || ENABLE_FEATURE_HTTPD_LAST_MODIFIED
> static const char RFC1123FMT[] ALIGN1 = "%a, %d %b %Y %H:%M:%S GMT";
> /* Fixed size 29-byte string. Example: Sun, 06 Nov 1994 08:49:37 GMT */
> char date_str[40]; /* using a bit larger buffer to paranoia reasons */
>
> struct tm tm;
> + time_t timer = time(NULL);
> +#endif
If Date is disabled but Last-Modified enabled:
CC networking/httpd.o
networking/httpd.c: In function 'send_headers':
networking/httpd.c:1065:9: error: unused variable 'timer'
[-Werror=unused-variable]
time_t timer = time(NULL);
^~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:198: networking/httpd.o] Error 1
make: *** [Makefile:743: networking] Error 2
I applied patches 1-3 with fixes to the above issues.
More information about the busybox
mailing list