Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Accept all 2xx and 3xx HTTP status codes as successful #228

Merged
merged 2 commits into from
May 22, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changed == to === when checking against null
  • Loading branch information
davidrautert committed Mar 25, 2014
commit 43915a7c751db3a366413da0ba8d84e94e203617
2 changes: 1 addition & 1 deletion lib/pollers/http/baseHttpPoller.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BaseHttpPoller.prototype.onResponseCallback = function(res) {
if (statusCode.match(/3\d{2}/)) {
return this.handleRedirectResponse(res); // abstract, see implementations in http and https
}
if (statusCode.match(/2\d{2}/) == null) {
if (statusCode.match(/2\d{2}/) === null) {
return this.handleErrorResponse(res);
}
this.handleOkResponse(res);
Expand Down