Skip to content

Commit

Permalink
Fix size calculation (#434)
Browse files Browse the repository at this point in the history
* Fix size calculation
  • Loading branch information
joohoi committed Apr 26, 2021
1 parent 4daf2b6 commit d6b2733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,7 @@
- master
- New
- Changed
- Fixed the way the "size" is calculated, it should match content-length now
- Fixed output writing so it doesn't silently fail if it needs to create directories recursively

- v1.3.0
Expand Down
3 changes: 1 addition & 2 deletions pkg/runner/simple.go
Expand Up @@ -13,7 +13,6 @@ import (
"strconv"
"strings"
"time"
"unicode/utf8"

"github.com/ffuf/ffuf/pkg/ffuf"
)
Expand Down Expand Up @@ -147,7 +146,7 @@ func (r *SimpleRunner) Execute(req *ffuf.Request) (ffuf.Response, error) {
}

if respbody, err := ioutil.ReadAll(httpresp.Body); err == nil {
resp.ContentLength = int64(utf8.RuneCountInString(string(respbody)))
resp.ContentLength = int64(len(string(respbody)))
resp.Data = respbody
}

Expand Down

0 comments on commit d6b2733

Please sign in to comment.