Date and Last-Modified headers now can be disabled while there still enabled by
default.
I hope in future versions they become disabled by default and later removed at
all.
I checked and Cache-Control works fine in Chrome and Firefox even if Date is
not present.
Last-Modified can be replaced
HTTP v1.1 was released in 1999 year and it's time to update BB HTTPD.
Browsers may behave badly with HTTP/1.0
E.g. Chrome not sends the If-None-Match header with ETag.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
In RFC 2616 sec. 14.18 said that sever MUST send Date header.
But in fact the header have sense only for Cache-Control and can be omitted.
In the same time the Date eats power, CPU and network resources which are
critical for embedded systems.
Signed-off-by: Sergey Ponomarev
---
If server respond with ETag then next time client (browser) resend it via
If-None-Match header.
Then httpd will check if file wasn't modified and if not return 304 Not
Modified status code.
The ETag value is constructed from file's last modification date in unix epoch
and it's size:
The Last-Modified header is used for caching.
The client (browser) will send back the received date to server via
If-Modified-Since request header.
But both headers MUST be an RFC 1123 formatted string.
And the formatting consumes resources on request parsing and response
generation.
Instead we