mirror of https://github.com/daffainfo/nuclei.git
Misc
parent
d1c3be8199
commit
f2e3033d24
|
@ -102,6 +102,9 @@ func (r *Request) Compile(options *protocols.ExecuterOptions) error {
|
||||||
r.customHeaders[parts[0]] = strings.TrimSpace(parts[1])
|
r.customHeaders[parts[0]] = strings.TrimSpace(parts[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.Body != "" && !strings.Contains(r.Body, "\r\n") {
|
||||||
|
r.Body = strings.ReplaceAll(r.Body, "\n", "\r\n")
|
||||||
|
}
|
||||||
if len(r.Raw) > 0 {
|
if len(r.Raw) > 0 {
|
||||||
for i, raw := range r.Raw {
|
for i, raw := range r.Raw {
|
||||||
if !strings.Contains(raw, "\r\n") {
|
if !strings.Contains(raw, "\r\n") {
|
||||||
|
|
|
@ -246,7 +246,6 @@ func (r *Request) executeRequest(reqURL string, request *generatedRequest, dynam
|
||||||
if parsed, err := url.Parse(formedURL); err == nil {
|
if parsed, err := url.Parse(formedURL); err == nil {
|
||||||
hostname = parsed.Hostname()
|
hostname = parsed.Hostname()
|
||||||
}
|
}
|
||||||
request.rawRequest.Data = strings.ReplaceAll(request.rawRequest.Data, "\n", "\r\n")
|
|
||||||
options := request.original.rawhttpClient.Options
|
options := request.original.rawhttpClient.Options
|
||||||
options.AutomaticContentLength = !r.DisableAutoContentLength
|
options.AutomaticContentLength = !r.DisableAutoContentLength
|
||||||
options.AutomaticHostHeader = !r.DisableAutoHostname
|
options.AutomaticHostHeader = !r.DisableAutoHostname
|
||||||
|
|
Loading…
Reference in New Issue