Skip to content

Commit

Permalink
TMP: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Sep 16, 2020
1 parent c07d671 commit c382a9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/registry/core/pod/rest/subresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ func (r *ProxyREST) Connect(ctx context.Context, id string, opts runtime.Object,
if err != nil {
return nil, err
}
fmt.Println(74, location.String())
location.Path = net.JoinPreservingTrailingSlash(location.Path, proxyOpts.Path)
fmt.Println(76, location.String())
// Return a proxy handler that uses the desired transport, wrapped with additional proxy handling (to get URL rewriting, X-Forwarded-* headers, etc)
return newThrottledUpgradeAwareProxyHandler(location, transport, true, false, false, responder), nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ func NewUpgradeRequestRoundTripper(connection, request http.RoundTripper) Upgrad

// normalizeLocation returns the result of parsing the full URL, with scheme set to http if missing
func normalizeLocation(location *url.URL) *url.URL {
normalized, _ := url.Parse(location.String())
normalized, err := url.Parse(location.String())
if err != nil {
panic(fmt.Errorf("error parsing %s (from %#v): %v", location.String(), location, err))
}
if len(normalized.Scheme) == 0 {
normalized.Scheme = "http"
}
Expand Down

0 comments on commit c382a9a

Please sign in to comment.