From 05069cbfaa70aa6ea82f166d36d86b7ff9b2d401 Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 6 Jan 2022 01:48:10 -0600 Subject: [PATCH] revendor with fixed rest lib --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/go-pkgz/rest/file_server.go | 4 +++- vendor/modules.txt | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0367a08..4e32bd9 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/felixge/httpsnoop v1.0.2 // indirect github.com/go-pkgz/lgr v0.10.4 github.com/go-pkgz/repeater v1.1.3 - github.com/go-pkgz/rest v1.12.1 + github.com/go-pkgz/rest v1.12.2 github.com/golang/protobuf v1.5.2 // indirect github.com/gorilla/handlers v1.5.1 github.com/prometheus/client_golang v1.11.0 diff --git a/go.sum b/go.sum index b140576..c5ad7e0 100644 --- a/go.sum +++ b/go.sum @@ -85,6 +85,8 @@ github.com/go-pkgz/rest v1.12.0 h1:zabW9ZLZzSyGsrTtEgzGUhGCfqcPnCr5nhfrap96mU4= github.com/go-pkgz/rest v1.12.0/go.mod h1:KUWAqbDteYGS/CiXftomQsKjtEOifXsJ36Ka0skYbmk= github.com/go-pkgz/rest v1.12.1 h1:s5EoHrHknaioHT/mGWaRMDk9GH2U/FmGMWQsCMj6III= github.com/go-pkgz/rest v1.12.1/go.mod h1:KUWAqbDteYGS/CiXftomQsKjtEOifXsJ36Ka0skYbmk= +github.com/go-pkgz/rest v1.12.2 h1:AQ7uuBmMcufbiUBc4IS8aqDNMvRJlhtRpXLSNRitjVo= +github.com/go-pkgz/rest v1.12.2/go.mod h1:KUWAqbDteYGS/CiXftomQsKjtEOifXsJ36Ka0skYbmk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= diff --git a/vendor/github.com/go-pkgz/rest/file_server.go b/vendor/github.com/go-pkgz/rest/file_server.go index fab1691..ccf47df 100644 --- a/vendor/github.com/go-pkgz/rest/file_server.go +++ b/vendor/github.com/go-pkgz/rest/file_server.go @@ -155,7 +155,9 @@ type respWriter404 struct { func (w *respWriter404) WriteHeader(status int) { w.status = status - w.Header().Set("Content-Type", "text/html; charset=utf-8") + if status == http.StatusNotFound { + w.Header().Set("Content-Type", "text/html; charset=utf-8") + } w.ResponseWriter.WriteHeader(status) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 7ed8322..55e4704 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -26,7 +26,7 @@ github.com/go-pkgz/lgr ## explicit; go 1.12 github.com/go-pkgz/repeater github.com/go-pkgz/repeater/strategy -# github.com/go-pkgz/rest v1.12.1 +# github.com/go-pkgz/rest v1.12.2 ## explicit; go 1.16 github.com/go-pkgz/rest github.com/go-pkgz/rest/logger