[Varnish] #1856: LostHeader with regsub

Varnish varnish-bugs at varnish-cache.org
Tue Feb 9 14:04:29 CET 2016

#1856: LostHeader with regsub
 Reporter:  gdelacroix  |       Type:  defect
   Status:  new         |   Priority:  normal
Milestone:              |  Component:  regress
  Version:  4.1.1       |   Severity:  normal
 Keywords:              |
 With 4.1.1, I get a "LostHeader     req.url" and "Error
 workspace_client overflow" when using this line:

 set req.url = regsub(req.url, "/([?])?$", "\1");

 ...that I took there a while ago: https://www.varnish-

 I didn't get this issue with 4.0.3

 The issue occurs because the regsub actually removes the url when it's
 just "/".

 Adding 'if (req.url != "/")...' or changing the regexp by "(?<=.)/([?])?$"
 to check there's something before the removed slash fixes the issue but
 the fact this error appears in 4.1.1 and not in 4.0.3 (didn't check 4.1.0)
 maybe an unexpected behavior...

 Anyway, the wiki page should be fixed ;o)

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

More information about the varnish-bugs mailing list