]> granicus.if.org Git - apache/commitdiff
In order to save a few cycles, delay a hash table lookup which is not necessary needed
authorChristophe Jaillet <jailletc36@apache.org>
Tue, 8 Sep 2015 03:14:34 +0000 (03:14 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Tue, 8 Sep 2015 03:14:34 +0000 (03:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701717 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/util.c

index 3d4b1ec3d85b7c0b1fb684c5085b313d8ff0bd50..8d4f64a2bd33b07e63427e5af2965e7f9ff54216 100644 (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