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

header.set(host) 无效 #16

Closed
dugei opened this issue Sep 9, 2020 · 0 comments
Closed

header.set(host) 无效 #16

dugei opened this issue Sep 9, 2020 · 0 comments

Comments

@dugei
Copy link

dugei commented Sep 9, 2020

in request.go : line 122

func (r *Request) initHeaders(req *http.Request) {
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
for k, v := range r.headers {
**if strings.ToLower(k) == "host" {
req.Host = v
}**else {
req.Header.Set(k, v)
}
}
}

@dugei dugei closed this as completed Sep 9, 2020
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

No branches or pull requests

1 participant