Go Middleware Vet

Finding high quality net/http middleware for go is hard. Middleware get outdated, have only partial support or fail to comply with basic net/http semantics in other ways. The httpmiddlewarevet project aims to provide developers with a clearer picture of which handlers are good net/http citizens and which are not.

  • github.com/didip/tollbooth

  • github.com/gorilla/handlers

    • CompressHandler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        failed
        failed
        failed

        HTTP/1.1 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/1.1+TLS : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/2.0 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must not implement http.Hijacker

      • http.Pusher

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must implement http.Pusher

      • io.ReaderFrom

        failed
        failed
        passed

        HTTP/1.1 : http.ResponseWriter must implement io.ReaderFrom

        HTTP/1.1+TLS : http.ResponseWriter must implement io.ReaderFrom

      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    • CompressHandlerLevel

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        failed
        failed
        failed

        HTTP/1.1 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/1.1+TLS : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/2.0 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must not implement http.Hijacker

      • http.Pusher

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must implement http.Pusher

      • io.ReaderFrom

        failed
        failed
        passed

        HTTP/1.1 : http.ResponseWriter must implement io.ReaderFrom

        HTTP/1.1+TLS : http.ResponseWriter must implement io.ReaderFrom

      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    failed
  • github.com/jpillora/ipfilter

    • Wrap

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
  • github.com/justinas/alice

    • Then

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
  • github.com/NYTimes/gziphandler

    • GzipHandler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        failed
        failed
        failed

        HTTP/1.1 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/1.1+TLS : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/2.0 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

      • context.Context

        failed
        failed
        failed

        HTTP/1.1 : Context().Done() not propagated

        HTTP/1.1+TLS : Context().Done() not propagated

        HTTP/2.0 : Context().Done() not propagated

      • http.CloseNotifier

        failed
        failed
        failed

        HTTP/1.1 : http.ResponseWriter must implement http.CloseNotifier

        HTTP/1.1+TLS : http.ResponseWriter must implement http.CloseNotifier

        HTTP/2.0 : http.ResponseWriter must implement http.CloseNotifier

      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must not implement http.Hijacker

      • http.Pusher

        failed
        failed
        passed

        HTTP/1.1 : http.ResponseWriter must not implement http.Pusher

        HTTP/1.1+TLS : http.ResponseWriter must not implement http.Pusher

      • io.ReaderFrom

        failed
        failed
        passed

        HTTP/1.1 : http.ResponseWriter must implement io.ReaderFrom

        HTTP/1.1+TLS : http.ResponseWriter must implement io.ReaderFrom

      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    failed
  • github.com/prometheus/client_golang/prometheus

    • InstrumentHandler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        failed
        failed
        failed

        HTTP/1.1 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/1.1+TLS : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/2.0 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

      • context.Context

        passed
        passed
        failed

        HTTP/2.0 : skipped: http.ResponseWriter is not http.Flusher

      • http.CloseNotifier

        passed
        passed
        failed

        HTTP/2.0 : skipped: http.ResponseWriter is not http.Flusher

      • http.Flusher

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must implement http.Flusher

      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must implement http.Pusher

      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    failed
    • Handler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
  • github.com/romainmenke/pusher/parser

    • Handler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
  • github.com/romainmenke/pusher/rules

    • Handler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
  • github.com/thoas/stats

    • Handler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        failed
        failed
        failed

        HTTP/1.1 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/1.1+TLS : http.ResponseWriter must implement WriteString(s string) (n int, err error)

        HTTP/2.0 : http.ResponseWriter must implement WriteString(s string) (n int, err error)

      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must not implement http.Hijacker

      • http.Pusher

        passed
        passed
        failed

        HTTP/2.0 : http.ResponseWriter must implement http.Pusher

      • io.ReaderFrom

        failed
        failed
        passed

        HTTP/1.1 : http.ResponseWriter must implement io.ReaderFrom

        HTTP/1.1+TLS : http.ResponseWriter must implement io.ReaderFrom

      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    failed
  • github.com/vulcand/oxy

    • forward.ServeHTTP

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
  • net/http

    • Handler

      HTTP/1.1

      HTTP/1.1+TLS

      HTTP/2.0

      • WriteString()

        passed
        passed
        passed
      • context.Context

        passed
        passed
        passed
      • http.CloseNotifier

        passed
        passed
        passed
      • http.Flusher

        passed
        passed
        passed
      • http.Hijacker

        passed
        passed
        passed
      • http.Pusher

        passed
        passed
        passed
      • io.ReaderFrom

        passed
        passed
        passed
      • request.Proto

        passed
        passed
        passed
      • request.TLS

        passed
        passed
        passed
    passed
passed

http.Handler correctly implements the interface for this Proto and Go Version.

failed

http.Handler does not implements the interface for this Proto and Go Version.

skipped

Test was skipped.

passed shield

Package passed all tests.

failed shield

Package failed one or more tests.