dgrr / http2

HTTP/2 implementation for fasthttp
Apache License 2.0
210 stars 37 forks source link

broken integration with fasthttp #67

Closed pablolagos closed 11 months ago

pablolagos commented 11 months ago

Recent changes in fashttp broke the integration with http2

See: https://github.com/valyala/fasthttp/pull/1602/files

package main

import (
    "github.com/valyala/fasthttp"
    "github.com/dgrr/http2"
)

func main() {
    s := &fasthttp.Server{
        Handler: yourHandler,
        Name:    "HTTP2 test",
    }

    http2.ConfigureServer(s, http2.ServerConfig{})

    s.ListenAndServeTLS(...)
}

Results in:

/go/pkg/mod/github.com/dgrr/http2@v0.3.5/configure.go:70:16: cannot use cl.Do (value of type func(req *fasthttp.Request, res *fasthttp.Response) (err error)) as fasthttp.RoundTripper value in assignment: func(req *fasthttp.Request, res *fasthttp.Response) (err error) does not implement fasthttp.RoundTripper (missing method RoundTrip)

dgrr commented 11 months ago

It is sad. I accept PRs if you are willing to contribute. Thanks

pablolagos commented 11 months ago

I will!