middleware: Update references in comments to why Hijacker is needed

This commit is contained in:
Mike Lang
2016-11-07 11:52:19 -08:00
parent 35cf10e1d6
commit 7155292765
2 changed files with 2 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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