Merge pull request #251 from projectdiscovery/dont-quit-on-error

Don't quit http requests on an error
dev
Mzack9999 2020-09-24 01:10:50 +02:00 committed by GitHub
commit 2a117d7dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 12 deletions

View File

@ -138,21 +138,17 @@ func (e *HTTPExecuter) ExecuteHTTP(ctx context.Context, p progress.IProgress, re
httpRequest, err := e.bulkHTTPRequest.MakeHTTPRequest(ctx, reqURL, dynamicvalues, e.bulkHTTPRequest.Current(reqURL))
if err != nil {
result.Error = err
p.Drop(remaining)
return
}
err = e.handleHTTP(reqURL, httpRequest, dynamicvalues, &result)
if err != nil {
result.Error = err
p.Drop(remaining)
return
} else {
// If the request was built correctly then execute it
err = e.handleHTTP(reqURL, httpRequest, dynamicvalues, &result)
if err != nil {
result.Error = errors.Wrap(err, "could not handle http request")
p.Drop(remaining)
}
}
// move always forward with requests
e.bulkHTTPRequest.Increment(reqURL)
p.Update()
remaining--