fix: http proxy modules couldn't handle properly requests with port number in the URL.

This commit is contained in:
Gianluca 2019-05-02 18:25:19 +02:00
parent f8566d6020
commit be62757efa

View file

@ -172,7 +172,7 @@ func (j *JSRequest) ParseForm() map[string]string {
}
func (j *JSRequest) ToRequest() (req *http.Request) {
url := fmt.Sprintf("%s://%s:%s%s?%s", j.Scheme, j.Hostname, j.req.URL.Port(), j.Path, j.Query)
url := fmt.Sprintf("%s://%s:%s%s?%s", j.Scheme, j.req.URL.Hostname(), j.req.URL.Port(), j.Path, j.Query)
if j.Body == "" {
req, _ = http.NewRequest(j.Method, url, j.req.Body)
} else {