changeset 171:cfb8147f19a7

Tests: use (?P<name>...) to be compatible with old PCRE versions. Perl-style syntax (?<name>...) 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<name>...) syntax now, it should be safe to use Python syntax instead (at worst a bit more tests will be broken in case of regression).
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 30 Aug 2011 18:32:14 +0400
parents c5696c97c735
children d099e407fff5
files http_server_name.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/http_server_name.t
+++ b/http_server_name.t
@@ -77,7 +77,7 @@ http {
 
     server {
         listen       127.0.0.1:8080;
-        server_name  "~^(?<name>www\p{N}+)\.example\.com$";
+        server_name  "~^(?P<name>www\p{N}+)\.example\.com$";
 
         location / {
             add_header X-Server $server_name;