diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-20 08:57:55 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-20 08:57:55 +0000 |
commit | e6a4b82e6e40a2346fd32eb63b0f8a47bf670257 (patch) | |
tree | 5de568c32cd176bbaffe58a7809ae76bf421c6f3 /modules/aggregator | |
parent | d8bd6cf97c7afce67b0b99817ccc139c65bc1c63 (diff) | |
download | brdo-e6a4b82e6e40a2346fd32eb63b0f8a47bf670257.tar.gz brdo-e6a4b82e6e40a2346fd32eb63b0f8a47bf670257.tar.bz2 |
#196535 by sun, chx, dww: check whether Drupal can issue HTTP requests at all, so we know that this is the cause of problems, not the remote host not responding.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.module | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 02128a2bf..add89541a 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -600,7 +600,7 @@ function aggregator_refresh($feed) { case 301: $feed['url'] = $result->redirect_url; watchdog('aggregator', 'Updated URL for feed %title to %url.', array('%title' => $feed['title'], '%url' => $feed['url'])); - + // Deliberate no break. case 200: case 302: case 307: @@ -648,11 +648,14 @@ function aggregator_refresh($feed) { watchdog('aggregator', 'There is new syndicated content from %site.', array('%site' => $feed['title'])); drupal_set_message(t('There is new syndicated content from %site.', array('%site' => $feed['title']))); + break; } - break; + $result->error = t('feed not parseable'); + // Deliberate no break. default: watchdog('aggregator', 'The feed from %site seems to be broken, due to "%error".', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error), WATCHDOG_WARNING); drupal_set_message(t('The feed from %site seems to be broken, because of error "%error".', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error))); + module_invoke('system', 'check_http_request'); } } |