mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
fix: prevent nil panic for unsafe HEAD requests
This commit is contained in:
@@ -224,11 +224,11 @@ get_response:
|
||||
}
|
||||
|
||||
var shouldIgnoreErrors, shouldIgnoreBodyErrors bool
|
||||
switch {
|
||||
case h.Options.Unsafe && req.Method == http.MethodHead && !stringsutil.ContainsAny(err.Error(), "i/o timeout"):
|
||||
if h.Options.Unsafe && req.Method == http.MethodHead && err != nil &&
|
||||
!stringsutil.ContainsAny(err.Error(), "i/o timeout") {
|
||||
shouldIgnoreErrors = true
|
||||
shouldIgnoreBodyErrors = true
|
||||
}
|
||||
}
|
||||
|
||||
var resp Response
|
||||
resp.Input = req.Host
|
||||
|
||||
Reference in New Issue
Block a user