Skip to content

Commit

Permalink
Merge pull request #251 from projectdiscovery/dont-quit-on-error
Browse files Browse the repository at this point in the history
Don't quit http requests on an error
  • Loading branch information
Mzack9999 committed Sep 23, 2020
2 parents fcd231a + d73ea47 commit 2a117d7
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions v2/pkg/executer/executer_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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--
Expand Down

0 comments on commit 2a117d7

Please sign in to comment.