diff --git a/README b/README index 16435a3..d3fad98 100644 --- a/README +++ b/README @@ -16,7 +16,7 @@ Currently only inspects the following headers: Range, If-Range, If-Unmodified-Since, If-Modified-Since, Date, Accept-Encoding, Accept-Language, Accept-Charset, Max-Forwards, If-Match, - If-None-Match + If-None-Match, Last-Modified Report Bugs Create a ticket on the issue tracking interface of GitHub: diff --git a/ngx_http_header_inspect.c b/ngx_http_header_inspect.c index 09c4ce3..ad149a2 100644 --- a/ngx_http_header_inspect.c +++ b/ngx_http_header_inspect.c @@ -1205,6 +1205,11 @@ if ((rc != NGX_OK) && conf->block) { return NGX_HTTP_BAD_REQUEST; } + } else if ((h[i].key.len == 13) && (ngx_strcmp("Last-Modified", h[i].key.data) == 0) ) { + rc = ngx_header_inspect_date_header(conf, r->connection->log, "Last-Modified", h[i].value); + if ((rc != NGX_OK) && conf->block) { + return NGX_HTTP_BAD_REQUEST; + } } else if ((h[i].key.len == 15) && (ngx_strcmp("Accept-Encoding", h[i].key.data) == 0) ) { rc = ngx_header_inspect_acceptencoding_header(conf, r->connection->log, h[i].value); if ((rc != NGX_OK) && conf->block) {