Browse Source

[core] http_response_handle_cachable() optim

short-circuit http_response_handle_cachable() if conditional request
headers are not present
master
Glenn Strauss 9 months ago
parent
commit
f5a62a0fd2
  1. 6
      src/http-header-glue.c

6
src/http-header-glue.c

@ -184,6 +184,12 @@ const buffer * http_response_set_last_modified(request_st * const r, const time_
int http_response_handle_cachable(request_st * const r, const buffer * const lmod, const time_t lmtime) {
if (!(r->rqst_htags
& (light_bshift(HTTP_HEADER_IF_NONE_MATCH)
|light_bshift(HTTP_HEADER_IF_MODIFIED_SINCE)))) {
return HANDLER_GO_ON;
}
const buffer *vb;
/*

Loading…
Cancel
Save