Mailing List Archive

#1856: LostHeader with regsub
#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-
cache.org/trac/wiki/VCLExampleNormalizingReqUrl

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1856: LostHeader with regsub [ In reply to ]
#1856: LostHeader with regsub
------------------------+--------------------
Reporter: gdelacroix | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: regress | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
------------------------+--------------------

Comment (by gdelacroix):

Brackets in regexps have been removed by Trac but I used the syntax as
shown in the wiki page, with brackets around "(?)". I only added "(?<=.)"
in front of the second one.

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1856: LostHeader with regsub [ In reply to ]
#1856: LostHeader with regsub
------------------------+-----------------------
Reporter: gdelacroix | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: regress | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
------------------------+-----------------------
Changes (by fgsch):

* status: new => needinfo


Comment:

I cannot reproduce it.

Can you supply a testcase (.vtc) or more details, i.e. the requested URL?

Also, which pcre version are you using?

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1856: LostHeader with regsub [ In reply to ]
#1856: LostHeader with regsub
------------------------+-----------------------
Reporter: gdelacroix | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: regress | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
------------------------+-----------------------

Comment (by gdelacroix):

Sorry, it's not clear in my message: it only occurs when URL is "/".

I'm using pcre 8.32.

I'm not firendly with VTC but you only have to apply the example from the
wiki.

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1856: LostHeader with regsub [ In reply to ]
#1856: LostHeader with regsub
------------------------+-----------------------
Reporter: gdelacroix | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: regress | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
------------------------+-----------------------

Comment (by fgsch):

Test attached.

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1856: LostHeader with regsub [ In reply to ]
#1856: LostHeader with regsub
------------------------+-----------------------
Reporter: gdelacroix | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: regress | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
------------------------+-----------------------

Comment (by fgsch):

Ok, this is not related to regsub.

The following construct will trigger the same workspace exhaustion:

{{{
set req.url = "";
}}}

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs