Skip to content
Snippets Groups Projects
Commit fb026479 authored by Alex Barth's avatar Alex Barth
Browse files

#842040 dixon_: Accept all responses from the 2xx status code series.

parent 839034a1
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
Feeds 6.x 1.X XXXX Feeds 6.x 1.X XXXX
------------------ ------------------
- #842040 dixon_: Accept all responses from the 2xx status code series.
- #836982 Steven Merrill: Fix Feeds.module tests do not work when run from the - #836982 Steven Merrill: Fix Feeds.module tests do not work when run from the
command line. command line.
......
...@@ -30,7 +30,7 @@ class FeedsHTTPBatch extends FeedsImportBatch { ...@@ -30,7 +30,7 @@ class FeedsHTTPBatch extends FeedsImportBatch {
public function getRaw() { public function getRaw() {
feeds_include_library('http_request.inc', 'http_request'); feeds_include_library('http_request.inc', 'http_request');
$result = http_request_get($this->url); $result = http_request_get($this->url);
if ($result->code != 200) { if (!in_array($result->code, array(200, 201, 202, 203, 204, 205, 206))) {
throw new Exception(t('Download of @url failed with code !code.', array('@url' => $this->url, '!code' => $result->code))); throw new Exception(t('Download of @url failed with code !code.', array('@url' => $this->url, '!code' => $result->code)));
} }
return $result->data; return $result->data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment