trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [trafficserver] branch master updated: fix regular expression
Date Fri, 14 Apr 2017 20:14:53 GMT
This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  340d91b   fix regular expression
340d91b is described below

commit 340d91b04cd74e6097cd16d0d206442995a038c3
Author: Jason Kenny <dragon512@live.com>
AuthorDate: Fri Apr 14 14:49:50 2017 -0500

    fix regular expression
---
 tests/gold_tests/headers/via-observer.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/gold_tests/headers/via-observer.py b/tests/gold_tests/headers/via-observer.py
index 6cedeec..53ca981 100644
--- a/tests/gold_tests/headers/via-observer.py
+++ b/tests/gold_tests/headers/via-observer.py
@@ -20,16 +20,16 @@ Extract the protocol information from the VIA headers and store it in
a log file
 import re
 
 log = open('via.log', 'w')
-rxp = re.compile('(^.*) \w+\[.*$')
+rxp = re.compile('(^.*) [\w._-]+\[.*$')
 
 def observe(headers):
-    if 'via' in headers :
+    if 'via' in headers:
         via = headers['via']
-        if via :
-            via = rxp.sub(r'\1',via)
-        else :
+        if via:
+            via = rxp.sub(r'\1', via)
+        else:
             via = ''
-    else :
+    else:
         via = '---missing---'
     log.write("Via: {}\n".format(via))
     log.flush()

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message