[Varnish] #1276: varnishncsa does not use the modified URL from within varnish VCL

Varnish varnish-bugs at varnish-cache.org
Wed Mar 6 19:48:49 CET 2013


#1276: varnishncsa does not use the modified URL from within varnish VCL
-------------------------+-------------------------
 Reporter:  raymondjiii  |       Type:  defect
   Status:  new          |   Priority:  normal
Milestone:               |  Component:  varnishncsa
  Version:  trunk        |   Severity:  normal
 Keywords:  varnishncsa  |
-------------------------+-------------------------
 I modify the URL within my VCL using inline C code with something like:

 C{
     if (strlen(VRT_r_req_url(sp)) < 1000) {
        syslog(LOG_ERR, "%s", VRT_r_req_url(sp));
        char url[1024] = "";
        strcpy(url, VRT_r_req_url(sp));
        (*URLRemoveTime_fn)(url);
        syslog(LOG_ERR, "%s", "Modified URL:");
        syslog(LOG_ERR, "%s", url);
        VRT_l_req_url(sp, url, vrt_magic_string_end);
     }
     else {
        syslog(LOG_ERR, "%s", "VARNISH URL TOO LONG");
        syslog(LOG_ERR, "%s", VRT_r_req_url(sp));
     }
 }C

 The above is within the "sub vcl receive" subroutine.


 I have done a number of tests showing that the modified URL does get
 cached within Varnish and is hashed against the modified URL.  I add
 X-Cache (Hit/Miss) and X-Cache-Hits HTTP headers to show that my modified
 URL is in fact being returned from Varnish and not the backend Apache
 server.

 Varnishncsa always shows the original URL and not my modified version of
 the URL.  My backend apache server log DOES show the modified URL.

 I would like varnishncsa to show the data with the modified URL and not
 the original URL request.

 I can provide any additional information needed.

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1276>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list