diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2019-12-10 00:38:47 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 19:54:29 -0400 |
commit | 19985261b2f288563c27ba6a9f88603baa275c50 (patch) | |
tree | 31c0b98a2d6735720e02616afb7768f50fb15e54 /src/mod_expire.c | |
parent | 27e27e5e4040e6b71a9c63077a5919aa151137f8 (diff) | |
download | lighttpd-git-19985261b2f288563c27ba6a9f88603baa275c50.tar.gz |
[core] convenience macros to check req methods
Diffstat (limited to 'src/mod_expire.c')
-rw-r--r-- | src/mod_expire.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mod_expire.c b/src/mod_expire.c index c80cc81b..efb58888 100644 --- a/src/mod_expire.c +++ b/src/mod_expire.c @@ -275,8 +275,7 @@ CONNECTION_FUNC(mod_expire_handler) { /* Add caching headers only to http_status 200 OK or 206 Partial Content */ if (con->http_status != 200 && con->http_status != 206) return HANDLER_GO_ON; /* Add caching headers only to GET or HEAD requests */ - if ( con->request.http_method != HTTP_METHOD_GET - && con->request.http_method != HTTP_METHOD_HEAD) return HANDLER_GO_ON; + if (!http_method_get_or_head(con->request.http_method)) return HANDLER_GO_ON; /* Add caching headers only if not already present */ vb = http_header_response_get(con, HTTP_HEADER_CACHE_CONTROL, CONST_STR_LEN("Cache-Control")); if (NULL != vb) return HANDLER_GO_ON; |