mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 11:40:33 -07:00
fix: http proxy modules couldn't handle properly requests with port number in the URL.
This commit is contained in:
parent
f8566d6020
commit
be62757efa
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue