Changeset

3279:e6b25054c110

mod_pubsub_feeds: Log a message for HTTP 301 redirects
author Kim Alvefur <zash@zash.se>
date Sat, 25 Aug 2018 14:14:27 +0200
parents 3278:958f0b8b502c
children 3280:645c4f14e03d
files mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sat Aug 25 13:59:32 2018 +0200
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sat Aug 25 14:14:27 2018 +0200
@@ -160,6 +160,8 @@
 			end
 		elseif code == 304 then
 			item.last_update = time();
+		elseif code == 301 and resp.headers.location then
+			module:log("info", "Feed %q has moved to %q", item.url, resp.headers.location);
 		elseif code == < 100 then
 			module:log("error", "Error fetching %q: %q[%d]", item.url, data, code);
 		else