Skip to content

Commit

Permalink
Don't treat 3xx status codes as errors
Browse files Browse the repository at this point in the history
Fixes #88
  • Loading branch information
tsenart committed Nov 7, 2014
1 parent eeb1dbe commit d310616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (a *Attacker) hit(tr Targeter) *Result {
res.BytesOut = uint64(req.ContentLength)
res.Code = uint16(r.StatusCode)
if body, err := ioutil.ReadAll(r.Body); err != nil {
if res.Code < 200 || res.Code >= 300 {
if res.Code < 200 || res.Code >= 400 {
res.Error = string(body)
}
} else {
Expand Down

0 comments on commit d310616

Please sign in to comment.