diff --git a/CHANGELOG.md b/CHANGELOG.md index a2f5454..36a869b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Added tls renegotiation flag to fix #193 in http.Client - Fixed HTML report to display select/combo-box for rows per page (and increased default from 10 to 250 rows). - Added Host information to JSON output file + - Fixed request method when supplying request file - v1.0.2 - Changed diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d1515e3..ce4dbb8 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -3,6 +3,7 @@ * [bsysop](https://twitter.com/bsysop) * [ccsplit](https://github.com/ccsplit) * [codingo](https://github.com/codingo) +* [c_sto](https://github.com/c-sto) * [Damian89](https://github.com/Damian89) * [Daviey](https://github.com/Daviey) * [delic](https://github.com/delic) diff --git a/main.go b/main.go index 43ee02d..93cb83c 100644 --- a/main.go +++ b/main.go @@ -471,10 +471,12 @@ func prepareConfig(parseOpts *cliOptions, conf *ffuf.Config) error { } // Handle copy as curl situation where POST method is implied by --data flag. If method is set to anything but GET, NOOP - if conf.Method == "GET" { - if len(conf.Data) > 0 { - conf.Method = "POST" - } + if len(conf.Data) > 0 && + conf.Method == "GET" && + //don't modify the method automatically if a request file is being used as input + len(parseOpts.request) == 0 { + + conf.Method = "POST" } conf.CommandLine = strings.Join(os.Args, " ")