In order to save a few cycles, delay a hash table lookup which is not necessary needed

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701717 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christophe Jaillet
2015-09-08 03:14:34 +00:00
parent dcad11179f
commit 27f8ab24e1

View File

@ -1823,10 +1823,11 @@ DAV_DECLARE(void) dav_add_vary_header(request_rec *in_req,
* so only do this check if there is a versioning provider */
if (vsn_hooks != NULL) {
const char *target = apr_table_get(in_req->headers_in, DAV_LABEL_HDR);
const char *vary = apr_table_get(out_req->headers_out, "Vary");
/* If Target-Selector specified, add it to the Vary header */
if (target != NULL) {
const char *vary = apr_table_get(out_req->headers_out, "Vary");
if (vary == NULL)
vary = DAV_LABEL_HDR;
else