mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
修复部分情况下url不合法导致出现报错的bug
This commit is contained in:
parent
d62bbdf5df
commit
58913caba7
@ -234,7 +234,7 @@ func (r *Runner) Prepare(ctx context.Context) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.Outputting()
|
r.Output()
|
||||||
return nil
|
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) {
|
debugPrint := func(bl *pkg.Baseline) {
|
||||||
if r.Color {
|
if r.Color {
|
||||||
logs.Log.Debug(bl.ColorString())
|
logs.Log.Debug(bl.ColorString())
|
||||||
|
@ -56,11 +56,10 @@ func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
bl.Path = uu.Path
|
bl.Path = uu.Path
|
||||||
bl.Url = uu
|
bl.Url = uu
|
||||||
}
|
|
||||||
|
|
||||||
if bl.Url.Host != host {
|
if bl.Url.Host != host {
|
||||||
bl.Host = host
|
bl.Host = host
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bl.Unique = UniqueHash(bl)
|
bl.Unique = UniqueHash(bl)
|
||||||
return bl
|
return bl
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user