From 2b5208a3b5aa176170be01145bee94e27a9202cd Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Wed, 28 Aug 2024 15:13:39 -0700 Subject: [PATCH] fsthttp: use less strict net/url parser --- fsthttp/request.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fsthttp/request.go b/fsthttp/request.go index 799e01b..0061639 100644 --- a/fsthttp/request.go +++ b/fsthttp/request.go @@ -13,6 +13,7 @@ import ( "time" "github.com/fastly/compute-sdk-go/internal/abi/fastly" + intneturl "github.com/fastly/compute-sdk-go/internal/net/url" ) // RequestLimits are the limits for the components of an HTTP request. @@ -149,10 +150,12 @@ func newClientRequest() (*Request, error) { return nil, fmt.Errorf("get URI: %w", err) } - u, err := url.ParseRequestURI(uri) + intu, err := intneturl.ParseRequestURI(uri) if err != nil { return nil, fmt.Errorf("parse URI: %w", err) } + uval := url.URL(*intu) + u := &uval proto, major, minor, err := abiReq.GetVersion() if err != nil {