From 577fedfce1921d90bff7c434b2fa602563947dd1 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 8 Sep 2021 05:11:02 +0300 Subject: [PATCH] net.http: fix a bug with ? in new_request --- vlib/net/http/http.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/net/http/http.v b/vlib/net/http/http.v index 3b4852f6e6..a6a850f5a6 100644 --- a/vlib/net/http/http.v +++ b/vlib/net/http/http.v @@ -30,7 +30,7 @@ pub mut: } pub fn new_request(method Method, url_ string, data string) ?Request { - url := if method == .get { url_ + '?' + data } else { url_ } + url := if method == .get && !url_.contains('?') { url_ + '?' + data } else { url_ } // println('new req() method=$method url="$url" dta="$data"') return Request{ method: method