Update https.go

pull/825/head
bboysoul 2021-06-29 11:22:51 +08:00 committed by GitHub
parent 646dd6f1ad
commit 147a1b2714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ func (https *HttpsServer) NewHttps(l net.Listener, certFile string, keyFile stri
func (https *HttpsServer) handleHttps(c net.Conn) {
hostName, rb := GetServerNameFromClientHello(c)
var targetAddr string
r := buildHttpsRequest(hostName)
r := buildHttpsRequest(hostName,c)
var host *file.Host
var err error
if host, err = file.GetDb().GetInfoByHost(hostName, r); err != nil {
@ -177,7 +177,7 @@ func GetServerNameFromClientHello(c net.Conn) (string, []byte) {
}
// build https request
func buildHttpsRequest(hostName string) *http.Request {
func buildHttpsRequest(hostName string, c) *http.Request {
r := new(http.Request)
r.RequestURI = "/"
r.URL = new(url.URL)