aboutsummaryrefslogtreecommitdiff
path: root/request.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2020-11-27 22:26:22 -0500
committerAdnan Maolood <[email protected]>2020-11-27 22:27:52 -0500
commit16739d20d0c97162c2a19dc47a4fd4318aa12a7e (patch)
tree9794faa7c0afce6e53f97639766ae31c011b744f /request.go
parentexamples/server: Increase certificate duration (diff)
downloadgo-gemini-16739d20d0c97162c2a19dc47a4fd4318aa12a7e.tar.xz
go-gemini-16739d20d0c97162c2a19dc47a4fd4318aa12a7e.zip
Fix escaping of queries
Diffstat (limited to 'request.go')
-rw-r--r--request.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/request.go b/request.go
index b302445..b4c95c2 100644
--- a/request.go
+++ b/request.go
@@ -51,6 +51,9 @@ func NewRequest(rawurl string) (*Request, error) {
// NewRequestFromURL returns a new request for the given URL.
// The host is inferred from the URL.
+//
+// Callers should be careful that the URL query is properly escaped.
+// See the documentation for QueryEscape for more information.
func NewRequestFromURL(url *url.URL) *Request {
host := url.Host
if url.Port() == "" {