From ee6525661b98b88556d7ac740e50765ad5284b30 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 16 Jan 2018 21:50:32 -0800 Subject: [PATCH] internal/tun2: qualify key names in request/response proxying --- internal/tun2/server.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/tun2/server.go b/internal/tun2/server.go index e4e3ab9..0e41ea2 100644 --- a/internal/tun2/server.go +++ b/internal/tun2/server.go @@ -412,9 +412,11 @@ func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) { ctx := req.Context() f := ln.F{ - "remote": req.RemoteAddr, - "host": req.Host, - "uri": req.RequestURI, + "req_remote": req.RemoteAddr, + "req_host": req.Host, + "req_uri": req.RequestURI, + "req_method": req.Method, + "req_content_length": req.ContentLength, } val, ok := s.domains.Get(req.Host) @@ -451,9 +453,8 @@ func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) { } ln.Log(ctx, c, ln.Action("http traffic"), f, ln.F{ - "status": resp.Status, - "status_code": resp.StatusCode, - "content_length": resp.ContentLength, + "resp_status_code": resp.StatusCode, + "resp_content_length": resp.ContentLength, }) return resp, nil