Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't append port to Host when using HTTPS #383

Closed
salty-horse opened this issue Nov 14, 2016 · 1 comment · Fixed by #385
Closed

Don't append port to Host when using HTTPS #383

salty-horse opened this issue Nov 14, 2016 · 1 comment · Fixed by #385

Comments

@salty-horse
Copy link

salty-horse commented Nov 14, 2016

Tested using 0.15.1, but I think it's relevant to master.

When --output-http points to HTTPS, Gor appends the ":443" port to the Host header.
This is unexpected. I can't find a reference in any standards, but browsers and various command line tools don't send it, and web servers don't expect it.

For example, here's curl's exception for HTTP and HTTPS: https://github.com/curl/curl/blob/0649433/lib/http.c#L2024

This condition in http_client.go line 64 should also check for "https":

if u.Scheme != "http" {
    u.Host += ":" + defaultPorts[u.Scheme]
}
@buger
Copy link
Owner

buger commented Nov 14, 2016

Should be fixed in master, thank you for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants