Ticket #1276 (closed defect: wontfix)

Opened 14 months ago

Last modified 14 months ago

varnishncsa does not use the modified URL from within varnish VCL

Reported by: raymondjiii Owned by:
Priority: normal Milestone:
Component: varnishncsa Version: trunk
Severity: normal Keywords: varnishncsa
Cc:

Description

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.

Change History

comment:1 Changed 14 months ago by raymondjiii

This is within Varnish 3.0.3

comment:2 Changed 14 months ago by tfheen

  • Status changed from new to closed
  • Resolution set to wontfix

This is intentional. If you want to log something else, use std.log("foo:" + req.url) and the %{VCL_Log:foo}x format.

Note: See TracTickets for help on using tickets.