This is an automated email from the ASF dual-hosted git repository.

rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 1e7bb46  Fix makeModHdrs() when mod headers config has an empty line.
1e7bb46 is described below

commit 1e7bb46d98095a79f6edd2bfb6ebc3549e42d1f1
Author: John Rushford <jrushf...@apache.org>
AuthorDate: Tue May 22 19:29:03 2018 +0000

    Fix makeModHdrs() when mod headers config has an empty line.
---
 grove/grovetccfg/grovetccfg.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/grove/grovetccfg/grovetccfg.go b/grove/grovetccfg/grovetccfg.go
index 50cd880..0e9db10 100644
--- a/grove/grovetccfg/grovetccfg.go
+++ b/grove/grovetccfg/grovetccfg.go
@@ -947,6 +947,9 @@ func makeModHdrs(edgeHRW string, remapTXT string) 
(web.ModHdrs, web.ModHdrs, err
                for _, line := range strings.Split(edgeHRW, "__RETURN__") {
                        line = strings.TrimSuffix(line, "[L]")
                        parts := strings.Fields(line)
+                       if len(parts) == 0 {
+                               continue
+                       }
                        if len(parts) < 2 {
                                return web.ModHdrs{}, web.ModHdrs{}, 
errors.New("edge header rewrite: malformed line '" + line + "'")
                        }

-- 
To stop receiving notification emails like this one, please contact
r...@apache.org.

Reply via email to