# HG changeset patch # User Maxim Dounin # Date 1314714734 -14400 # Node ID cfb8147f19a75b3d6b6ef57c0fc0eb6056157e60 # Parent c5696c97c7354fc4f6df72ab59f9cee3d65c1190 Tests: use (?P...) to be compatible with old PCRE versions. Perl-style syntax (?...) is only supported by PCRE 7.0+, while some OSes out there still use PCRE 6.6. Since there are no problems in nginx with (?P...) syntax now, it should be safe to use Python syntax instead (at worst a bit more tests will be broken in case of regression). diff --git a/http_server_name.t b/http_server_name.t --- a/http_server_name.t +++ b/http_server_name.t @@ -77,7 +77,7 @@ http { server { listen 127.0.0.1:8080; - server_name "~^(?www\p{N}+)\.example\.com$"; + server_name "~^(?Pwww\p{N}+)\.example\.com$"; location / { add_header X-Server $server_name;