Skip to content

Commit

Permalink
Merge pull request #26 from C-Sto/goodcanary
Browse files Browse the repository at this point in the history
fix content length breaking soft 404 stuff
  • Loading branch information
C-Sto authored May 23, 2019
2 parents 2e2e692 + 71ce626 commit 7a1575a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions librecursebuster/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func (gState *State) HTTPReq(method, path string, client *http.Client) (resp *ht
return resp, err
}
resp.Body = ioutil.NopCloser(bytes.NewBuffer(body))
//when the transfer encoding was chunked - this caused the response length to be -1, breaking the soft 404 stuff. Honestly, the HTTP spec is a massive pain in the ass.
resp.ContentLength = int64(len(body))

return resp, err
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/fatih/color"
)

const version = "1.6.10"
const version = "1.6.11"

func main() {
if runtime.GOOS == "windows" { //lol goos
Expand Down

0 comments on commit 7a1575a

Please sign in to comment.