View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006267 | OXID eShop (all versions) | 4.08. Cache | public | 2015-11-19 14:48 | 2024-09-11 13:00 |
Reporter | Adrian.Kirchner | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.9.4 / 5.2.4 | ||||
Summary | 0006267: Varnish vcl evalutates regex url expressions case sensitive while invalidation requests | ||||
Description | This is a follow-up to 0006263. Further investigation revealed a problem with case sensivity. | ||||
Steps To Reproduce | 1) add a category with title 'SomeCategory' 2) visit the Category via http://shop.tld/SomeCategory/ 3) visit the Category via http://shop.tld/somecategory/ (lower case) 4) Trigger a save action in the oxid backend for this category 5) Reload both urls in the shop frontend and verify via varnish headers, that only the first url is invalidated in 4) | ||||
Additional Information | The ban() call in the vcl subroutine oxInvalidateRecv needs to evaluate the x-ban-url in a case insensitive manner. Instead of > ban("obj.http.x-url ~ " + req.http.x-ban-url [..] It should be > ban("obj.http.x-url ~ (?i)" + req.http.x-ban-url [..] | ||||
Tags | Cache, EE, Performance and Caching Rework, Varnish | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
related to | 0006263 | acknowledged | florian.auer | Dependency invalidation fails with URLs containing regular expression characters |
|
From the Varnish docu: Are regular expressions case sensitive or not? Can I change it? In 2.1 and newer, regular expressions are case sensitive by default. In earlier versions, they were case insensitive. To change this for a single regex in 2.1, use (?i) at the start. ------------------------------ From version 2.1.0 and forward, we use PCRE regular expressions, where it is possible to control case-sensitivity in the individual regular expressions, so we decided that it would probably confuse people if we made the default case-insentive. (We promise not to change our minds about this again.) To make a PCRE regex case insensitive, put (?i) at the start: if (req.http.host ~ "(?i)example.com$") { ... } Source: https://www.varnish-cache.org/docs/2.1/faq/general.html |
|
To keep the promise and because it is easy to change, we won't change this. If there are places in the shop code itself where the wrong URLs are stored, please open tickets for that accordingly |