fix file get thing (#226)

* fix file get thing

* update doco
This commit is contained in:
C_Sto 2020-07-23 17:15:36 +08:00 committed by GitHub
parent 80c6afad01
commit 27fcbee730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -12,6 +12,7 @@
- Added tls renegotiation flag to fix #193 in http.Client - 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). - 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 - Added Host information to JSON output file
- Fixed request method when supplying request file
- v1.0.2 - v1.0.2
- Changed - Changed

View File

@ -3,6 +3,7 @@
* [bsysop](https://twitter.com/bsysop) * [bsysop](https://twitter.com/bsysop)
* [ccsplit](https://github.com/ccsplit) * [ccsplit](https://github.com/ccsplit)
* [codingo](https://github.com/codingo) * [codingo](https://github.com/codingo)
* [c_sto](https://github.com/c-sto)
* [Damian89](https://github.com/Damian89) * [Damian89](https://github.com/Damian89)
* [Daviey](https://github.com/Daviey) * [Daviey](https://github.com/Daviey)
* [delic](https://github.com/delic) * [delic](https://github.com/delic)

10
main.go
View File

@ -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 // 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 &&
if len(conf.Data) > 0 { conf.Method == "GET" &&
conf.Method = "POST" //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, " ") conf.CommandLine = strings.Join(os.Args, " ")