mod_pubsub_feeds: Specify acceptable formats in Accept header
Don't need to a condition on the etag, if it's nil it's left out.
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Sun Jun 25 20:15:44 2023 +0200
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Sun Jun 25 23:53:15 2023 +0200
@@ -151,10 +151,10 @@
end
function fetch(item, callback) -- HTTP Pull
- local headers = { };
- if item.etag then
- headers["If-None-Match"] = item.etag;
- end
+ local headers = {
+ ["If-None-Match"] = item.etag;
+ ["Accept"] = "application/atom+xml, application/x-rss+xml, application/xml";
+ };
http.request(item.url, { headers = headers }, function(data, code, resp)
if code == 200 then
if callback then callback(item, data) end