Mercurial > hg > nginx-tests
comparison server_tokens.t @ 1119:cfe1bc3162f9
Tests: fixed capturing Server header in server_tokens.t.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 30 Jan 2017 20:06:38 +0300 |
parents | 882267679006 |
children | a6ffc722dfcb |
comparison
equal
deleted
inserted
replaced
1118:6c27d5cab1d7 | 1119:cfe1bc3162f9 |
---|---|
98 return http_get($uri) =~ /.*?\x0d\x0a?\x0d\x0a?(.*)/ms && $1; | 98 return http_get($uri) =~ /.*?\x0d\x0a?\x0d\x0a?(.*)/ms && $1; |
99 } | 99 } |
100 | 100 |
101 sub http_get_server { | 101 sub http_get_server { |
102 my ($url) = @_; | 102 my ($url) = @_; |
103 http_get($url) =~ /^Server:\s(.+?)\x0d?$/mi; | 103 return http_get($url) =~ /^Server:\s(.+?)\x0d?$/mi && $1 || undef; |
104 return $1; | |
105 } | 104 } |
106 | 105 |
107 ############################################################################### | 106 ############################################################################### |