As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 1f38c207 authored by Igor Drozdov's avatar Igor Drozdov
Browse files

Send HTTP/1.1 request instead of HTTP/2

With EnableFullDuplex() bidirectional communication works even
for HTTP/1.1
parent e627f0d8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,26 +2,14 @@ package uploadpack
import (
"context"
"crypto/tls"
"io"
"net"
"net/http"
"golang.org/x/net/http2"
"gitlab.com/gitlab-org/gitlab-shell/v14/internal/command/shared/accessverifier"
)
func (c *Command) performWorkhorseCall(ctx context.Context, response *accessverifier.Response) error {
client := &http.Client{
Transport: &http2.Transport{
AllowHTTP: true,
DialTLSContext: func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
dialer := &net.Dialer{}
return dialer.DialContext(ctx, network, addr)
},
},
}
client := &http.Client{}
req, err := http.NewRequestWithContext(ctx, http.MethodPost, response.GitRpcUrl, io.NopCloser(c.ReadWriter.In))
if err != nil {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment