Skip to content

Commit

Permalink
don't escape paths twice
Browse files Browse the repository at this point in the history
  • Loading branch information
huttotw committed Apr 8, 2024
1 parent d5613d4 commit ad20f19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions internal/impl/confluent/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ func (c *schemaRegistryClient) walkReferencesTracked(ctx context.Context, seen m
}

func (c *schemaRegistryClient) doRequest(ctx context.Context, verb, reqPath string) (resCode int, resBody []byte, err error) {
reqURL := *c.schemaRegistryBaseURL
if reqURL.Path, err = url.JoinPath(reqURL.Path, reqPath); err != nil {
return
}
reqURL := c.schemaRegistryBaseURL.JoinPath(c.schemaRegistryBaseURL.Path, reqPath)

var req *http.Request
if req, err = http.NewRequestWithContext(ctx, verb, reqURL.String(), http.NoBody); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/impl/confluent/serde_protobuf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ message bar {
},
},
}), nil
case "/subjects/stuffs%2Fthething.proto/versions/10", "/schemas/ids/2":
case "/subjects/stuffs/thething.proto/versions/10", "/schemas/ids/2":
return mustJBytes(t, map[string]any{
"id": 2,
"version": 10,
Expand Down

0 comments on commit ad20f19

Please sign in to comment.