diff options
Diffstat (limited to 'plugins/http')
-rw-r--r-- | plugins/http/serve.go | 6 | ||||
-rw-r--r-- | plugins/http/static/etag.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/http/serve.go b/plugins/http/serve.go index 338d4339..26fccf79 100644 --- a/plugins/http/serve.go +++ b/plugins/http/serve.go @@ -21,7 +21,7 @@ func (s *Plugin) serveHTTP(errCh chan error) { if s.http == nil { return } - const op = errors.Op("http_plugin_serve_http") + const op = errors.Op("serveHTTP") if len(s.mdwr) > 0 { applyMiddlewares(s.http, s.mdwr, s.cfg.Middleware, s.log) @@ -43,7 +43,7 @@ func (s *Plugin) serveHTTPS(errCh chan error) { if s.https == nil { return } - const op = errors.Op("http_plugin_serve_https") + const op = errors.Op("serveHTTPS") if len(s.mdwr) > 0 { applyMiddlewares(s.https, s.mdwr, s.cfg.Middleware, s.log) } @@ -70,7 +70,7 @@ func (s *Plugin) serveFCGI(errCh chan error) { if s.fcgi == nil { return } - const op = errors.Op("http_plugin_serve_fcgi") + const op = errors.Op("serveFCGI") if len(s.mdwr) > 0 { applyMiddlewares(s.https, s.mdwr, s.cfg.Middleware, s.log) diff --git a/plugins/http/static/etag.go b/plugins/http/static/etag.go index 70673337..c457b95e 100644 --- a/plugins/http/static/etag.go +++ b/plugins/http/static/etag.go @@ -5,9 +5,9 @@ import ( "io" "net/http" "os" - "unsafe" httpConfig "github.com/spiral/roadrunner/v2/plugins/http/config" + "github.com/spiral/roadrunner/v2/utils" ) const etag string = "Etag" @@ -44,7 +44,7 @@ func SetEtag(cfg *httpConfig.Static, f *os.File, w http.ResponseWriter) { calculatedEtag = appendUint(calculatedEtag, crc32.Checksum(body, crc32q)) calculatedEtag = append(calculatedEtag, '"') - w.Header().Set(etag, byteToSrt(calculatedEtag)) + w.Header().Set(etag, utils.AsString(calculatedEtag)) } // appendUint appends n to dst and returns the extended dst. |