From 48ead0c543b7f1a44295e078ace5c683a5c8e8d0 Mon Sep 17 00:00:00 2001 From: Nick Sardo Date: Wed, 20 Jun 2018 16:31:47 -0700 Subject: [PATCH] Add host to echo dump --- cmd/echo/app/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/echo/app/handlers.go b/cmd/echo/app/handlers.go index 38154a22ee..4512372792 100644 --- a/cmd/echo/app/handlers.go +++ b/cmd/echo/app/handlers.go @@ -82,6 +82,7 @@ func echo(w http.ResponseWriter, r *http.Request) { setHeadersFromQueryString(w, r) var dump = struct { + Host string `json:"host"` Method string `json:"method"` URI string `json:"uri"` HTTPVersion string `json:"httpVersion"` @@ -92,6 +93,7 @@ func echo(w http.ResponseWriter, r *http.Request) { Header map[string][]string `json:"header"` ServerVersion string `json:"serverVersion"` }{ + Host: r.Host, Method: r.Method, URI: r.RequestURI, HTTPVersion: fmt.Sprintf("%d.%d", r.ProtoMajor, r.ProtoMinor),