mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #575 from projectdiscovery/bugfix-race-conditions
removing dump request for race conditionsdev
commit
22f04cae35
|
@ -211,17 +211,23 @@ func (r *Request) executeRequest(reqURL string, request *generatedRequest, dynam
|
|||
r.setCustomHeaders(request)
|
||||
|
||||
var (
|
||||
resp *http.Response
|
||||
fromcache bool
|
||||
resp *http.Response
|
||||
fromcache bool
|
||||
dumpedRequest []byte
|
||||
err error
|
||||
)
|
||||
dumpedRequest, err := dump(request, reqURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if r.options.Options.Debug || r.options.Options.DebugRequests {
|
||||
gologger.Info().Msgf("[%s] Dumped HTTP request for %s\n\n", r.options.TemplateID, reqURL)
|
||||
gologger.Print().Msgf("%s", string(dumpedRequest))
|
||||
// For race conditions we can't dump the request body at this point as it's already waiting the open-gate event
|
||||
if !request.original.Race {
|
||||
dumpedRequest, err = dump(request, reqURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if r.options.Options.Debug || r.options.Options.DebugRequests {
|
||||
gologger.Info().Msgf("[%s] Dumped HTTP request for %s\n\n", r.options.TemplateID, reqURL)
|
||||
gologger.Print().Msgf("%s", string(dumpedRequest))
|
||||
}
|
||||
}
|
||||
|
||||
var formedURL string
|
||||
|
|
Loading…
Reference in New Issue