Merge branch 'master' of github.com:projectdiscovery/httpx

This commit is contained in:
Mzack9999 2020-05-29 23:55:59 +02:00
commit 1c49bf5ce3
2 changed files with 4 additions and 3 deletions

View File

@ -207,9 +207,8 @@ retry:
builder.WriteString(fmt.Sprintf(" [%d]", resp.ContentLength))
}
title := ""
title := httpx.ExtractTitle(resp)
if scanopts.OutputTitle {
title = httpx.ExtractTitle(resp)
builder.WriteString(fmt.Sprintf(" [%s]", title))
}

View File

@ -146,10 +146,12 @@ func (h *HTTPX) AddFilter(f Filter) {
// NewRequest from url
func (h *HTTPX) NewRequest(method, URL string) (req *retryablehttp.Request, err error) {
req, err = retryablehttp.NewRequest(method, URL, nil)
if err != nil {
return
}
// set default user agent
req.Header.Set("User-Agent", h.Options.DefaultUserAgent)
return
}