Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: invite back default http server transport #140

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions http/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import (

func init() {
st := NewServerTransport(func() *stdhttp.Server { return &stdhttp.Server{} })
DefaultServerTransport = st
DefaultHTTP2ServerTransport = st
// Server transport (protocol file service).
transport.RegisterServerTransport("http", st)
transport.RegisterServerTransport("http2", st)
Expand All @@ -60,6 +62,12 @@ func init() {
transport.RegisterClientTransport("http2", DefaultHTTP2ClientTransport)
}

// DefaultServerTransport is the default server http transport.
var DefaultServerTransport transport.ServerTransport

// DefaultHTTP2ServerTransport is the default server http2 transport.
var DefaultHTTP2ServerTransport transport.ServerTransport

// ServerTransport is the http transport layer.
type ServerTransport struct {
newServer func() *stdhttp.Server
Expand Down
Loading