修复host输出不适当的bug

This commit is contained in:
M09Ic 2023-01-10 01:08:42 +08:00
parent 599118284c
commit 1fca8c146f

View File

@ -25,7 +25,7 @@ func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
bl.Url = uu
}
bl.Dir = bl.IsDir()
if resp.ClientType == ihttp.STANDARD {
if bl.Url.Host != host {
bl.Host = host
}
header := resp.Header()
@ -67,7 +67,7 @@ func NewInvalidBaseline(u, host string, resp *ihttp.Response, reason string) *Ba
}
bl.Dir = bl.IsDir()
if resp.ClientType == ihttp.STANDARD {
if bl.Url.Host != host {
bl.Host = host
}