mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-18 04:49:55 +00:00
middleware: Update references in comments to why Hijacker is needed
This commit is contained in:
@@ -83,7 +83,7 @@ func (i *errorInterceptor) Write(data []byte) (int, error) {
|
||||
}
|
||||
|
||||
// errorInterceptor also implements net.Hijacker, to let the downstream Handler
|
||||
// hijack the connection. This is needed by the app-mapper's proxy.
|
||||
// hijack the connection. This is needed, for example, for working with websockets.
|
||||
func (i *errorInterceptor) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
hj, ok := i.originalWriter.(http.Hijacker)
|
||||
if !ok {
|
||||
|
||||
@@ -45,7 +45,7 @@ var LogFailed = Log{
|
||||
// want to report on success, i.e. http.StatusOK.
|
||||
//
|
||||
// interceptor also implements net.Hijacker, to let the downstream Handler
|
||||
// hijack the connection. This is needed by the app-mapper's proxy.
|
||||
// hijack the connection. This is needed, for example, for working with websockets.
|
||||
type interceptor struct {
|
||||
http.ResponseWriter
|
||||
statusCode int
|
||||
|
||||
Reference in New Issue
Block a user