修复部分情况下url不合法导致出现报错的bug

This commit is contained in:
M09Ic 2023-02-21 17:58:16 +08:00
parent d62bbdf5df
commit 58913caba7
2 changed files with 5 additions and 6 deletions

View File

@ -234,7 +234,7 @@ func (r *Runner) Prepare(ctx context.Context) error {
if err != nil {
return err
}
r.Outputting()
r.Output()
return nil
}
@ -347,7 +347,7 @@ func (r *Runner) PrintStat(pool *Pool) {
}
}
func (r *Runner) Outputting() {
func (r *Runner) Output() {
debugPrint := func(bl *pkg.Baseline) {
if r.Color {
logs.Log.Debug(bl.ColorString())

View File

@ -56,10 +56,9 @@ func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
if err == nil {
bl.Path = uu.Path
bl.Url = uu
}
if bl.Url.Host != host {
bl.Host = host
if bl.Url.Host != host {
bl.Host = host
}
}
bl.Unique = UniqueHash(bl)
return bl