From c3669f9068bebb159822706bc9a6cd816883d16e Mon Sep 17 00:00:00 2001 From: Roland Bracewell Shoemaker Date: Wed, 2 May 2018 10:20:21 -0700 Subject: [PATCH] Split endpoint and path in WFE+WFE2 web.RequestEvent (#3683) --- web/context.go | 1 + wfe/wfe.go | 3 +-- wfe2/wfe.go | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/context.go b/web/context.go index 5427d9194..3db5be566 100644 --- a/web/context.go +++ b/web/context.go @@ -14,6 +14,7 @@ import ( type RequestEvent struct { RealIP string `json:",omitempty"` Endpoint string `json:",omitempty"` + Slug string `json:",omitempty"` Method string `json:",omitempty"` Errors []string `json:",omitempty"` Requester int64 `json:",omitempty"` diff --git a/wfe/wfe.go b/wfe/wfe.go index 210800339..a881a5c31 100644 --- a/wfe/wfe.go +++ b/wfe/wfe.go @@ -11,7 +11,6 @@ import ( "net" "net/http" "net/url" - "path" "regexp" "strconv" "strings" @@ -175,7 +174,7 @@ func (wfe *WebFrontEndImpl) HandleFunc(mux *http.ServeMux, pattern string, h web logEvent.Endpoint = pattern if request.URL != nil { - logEvent.Endpoint = path.Join(logEvent.Endpoint, request.URL.Path) + logEvent.Slug = request.URL.Path } switch request.Method { diff --git a/wfe2/wfe.go b/wfe2/wfe.go index 1573b1b3a..ad044e935 100644 --- a/wfe2/wfe.go +++ b/wfe2/wfe.go @@ -9,7 +9,6 @@ import ( "fmt" "net" "net/http" - "path" "regexp" "strconv" "strings" @@ -175,7 +174,7 @@ func (wfe *WebFrontEndImpl) HandleFunc(mux *http.ServeMux, pattern string, h web logEvent.Endpoint = pattern if request.URL != nil { - logEvent.Endpoint = path.Join(logEvent.Endpoint, request.URL.Path) + logEvent.Slug = request.URL.Path } switch request.Method {