Skip to content

Commit

Permalink
Merge pull request #1845 from projectdiscovery/dev
Browse files Browse the repository at this point in the history
Bugfix release
  • Loading branch information
ehsandeep committed Apr 13, 2022
2 parents 659e85f + 9d27344 commit 64ba284
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v2/pkg/catalog/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Config struct {
const nucleiConfigFilename = ".templates-config.json"

// Version is the current version of nuclei
const Version = `2.6.6`
const Version = `2.6.7`

func getConfigDetails() (string, error) {
configDir, err := GetConfigDir()
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/protocols/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ func (request *Request) executeRequest(reqURL string, generatedRequest *generate
}

responseContentType := resp.Header.Get("Content-Type")
isResponseTruncated := len(gotData) >= request.MaxSize
isResponseTruncated := request.MaxSize >0 && len(gotData) >= request.MaxSize
dumpResponse(event, request, response.fullResponse, formedURL, responseContentType, isResponseTruncated, reqURL)

callback(event)
Expand Down
4 changes: 3 additions & 1 deletion v2/pkg/protocols/http/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,17 @@ func dump(req *generatedRequest, reqURL string) ([]byte, error) {
if req.request != nil {
// Create a copy on the fly of the request body - ignore errors
bodyBytes, _ := req.request.BodyBytes()
var dumpBody bool
if len(bodyBytes) > 0 {
req.request.Request.ContentLength = int64(len(bodyBytes))
req.request.Request.Body = ioutil.NopCloser(bytes.NewReader(bodyBytes))
} else {
req.request.Request.ContentLength = 0
req.request.Request.Body = nil
delete(req.request.Request.Header, "Content-length")
}

dumpBytes, err := httputil.DumpRequestOut(req.request.Request, true)
dumpBytes, err := httputil.DumpRequestOut(req.request.Request, dumpBody)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 64ba284

Please sign in to comment.