mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-07-05 02:27:39 +00:00
fix(manager): ensure HTTP1 is set when HTTP2 is disabled
Tests / Integration Tests (push) Failing after 1s
Tests / Unit Tests (push) Failing after 1m41s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 3m50s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 3m53s
Build , Vet Test, and Lint / Build (push) Successful in 3m55s
Build , Vet Test, and Lint / Lint Code (push) Successful in 4m3s
Tests / Integration Tests (push) Failing after 1s
Tests / Unit Tests (push) Failing after 1m41s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 3m50s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 3m53s
Build , Vet Test, and Lint / Build (push) Successful in 3m55s
Build , Vet Test, and Lint / Lint Code (push) Successful in 4m3s
This commit is contained in:
@@ -488,6 +488,7 @@ func newInstance(cfg Config) (*serverInstance, error) {
|
|||||||
// For the current process, set GODEBUG=http2xconnect=1 in the environment before launch.
|
// For the current process, set GODEBUG=http2xconnect=1 in the environment before launch.
|
||||||
if httpServer.Protocols == nil {
|
if httpServer.Protocols == nil {
|
||||||
httpServer.Protocols = &http.Protocols{}
|
httpServer.Protocols = &http.Protocols{}
|
||||||
|
httpServer.Protocols.SetHTTP1(true)
|
||||||
}
|
}
|
||||||
if cfg.HTTP2 {
|
if cfg.HTTP2 {
|
||||||
if existing := os.Getenv("GODEBUG"); !strings.Contains(existing, "http2xconnect=1") {
|
if existing := os.Getenv("GODEBUG"); !strings.Contains(existing, "http2xconnect=1") {
|
||||||
@@ -503,6 +504,7 @@ func newInstance(cfg Config) (*serverInstance, error) {
|
|||||||
httpServer.Protocols.SetHTTP2(true)
|
httpServer.Protocols.SetHTTP2(true)
|
||||||
httpServer.Protocols.SetUnencryptedHTTP2(true)
|
httpServer.Protocols.SetUnencryptedHTTP2(true)
|
||||||
} else {
|
} else {
|
||||||
|
httpServer.Protocols.SetHTTP1(true)
|
||||||
httpServer.Protocols.SetHTTP2(false)
|
httpServer.Protocols.SetHTTP2(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user