mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-05 22:30:31 +02:00
fix: remove http2 support
This commit is contained in:
parent
ae018b6b48
commit
e1c1d36234
@ -9,9 +9,6 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"golang.org/x/net/http2"
|
|
||||||
"golang.org/x/net/http2/h2c"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func newHTTPServer(network, address, name string, handler http.Handler) (*Server, ServeFunction) {
|
func newHTTPServer(network, address, name string, handler http.Handler) (*Server, ServeFunction) {
|
||||||
@ -20,7 +17,7 @@ func newHTTPServer(network, address, name string, handler http.Handler) (*Server
|
|||||||
ReadTimeout: DefaultReadTimeOut,
|
ReadTimeout: DefaultReadTimeOut,
|
||||||
WriteTimeout: DefaultWriteTimeOut,
|
WriteTimeout: DefaultWriteTimeOut,
|
||||||
MaxHeaderBytes: DefaultMaxHeaderBytes,
|
MaxHeaderBytes: DefaultMaxHeaderBytes,
|
||||||
Handler: h2c.NewHandler(handler, &http2.Server{}),
|
Handler: handler,
|
||||||
BaseContext: func(net.Listener) context.Context { return GetManager().HammerContext() },
|
BaseContext: func(net.Listener) context.Context { return GetManager().HammerContext() },
|
||||||
}
|
}
|
||||||
server.OnShutdown = func() {
|
server.OnShutdown = func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user