parnurzeal / gorequest

GoRequest -- Simplified HTTP client ( inspired by nodejs SuperAgent )
http://parnurzeal.github.io/gorequest/
MIT License
3.44k stars 414 forks source link

Auto add "=" to url #241

Open kncxstudio opened 4 years ago

kncxstudio commented 4 years ago

The target url is http://127.0.0.1/1.cgi?123 and gorequest will auto add "=" to url.

`
resp,body,errs := client.Post("http://127.0.0.1/1.cgi?123“).

    Set("Cookie","SESSID=" + af.Session).

    Type("multipart").

    SendFile(data,"1.txt","file").

    End()

`

The request is :

&{POST /1.cgi?123= HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[242] Content-Type:[multipart/form-data; boundary=74eee9ea75a2628254595062181fcb200a888098c0251fc8295b2b5a6443] Cookie:[SESSID=72F58ACD22D0E2C57BEA123F270B8F4EE77F409C106EA31DF99D66A18F8F6DB] User-Agent:[Go-http-client/1.1]] 0xc000184780 242 [] false 127.0.0.1:11111 map[] map[] map[] 127.0.0.1:39414 /?123= 0xc0001847c0} --74eee9ea75a2628254595062181fcb200a888098c0251fc8295b2b5a6443 Content-Disposition: form-data; name="file1"; filename="1.txt" Content-Type: application/octet-stream

123

--74eee9ea75a2628254595062181fcb200a888098c0251fc8295b2b5a6443--

This caused the request failed.