Skip to content

Commit

Permalink
Merge pull request #544 from mikedewar/master
Browse files Browse the repository at this point in the history
nsq_to_http: accept any 2xx response
  • Loading branch information
mreiferson committed Feb 19, 2015
2 parents 079d5cd + 7185d9a commit 04e0f27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/nsq_to_http/nsq_to_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (p *PostPublisher) Publish(addr string, msg []byte) error {
return err
}
resp.Body.Close()
if resp.StatusCode != 200 {
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return errors.New(fmt.Sprintf("got status code %d", resp.StatusCode))
}
return nil
Expand Down

0 comments on commit 04e0f27

Please sign in to comment.