# HG changeset patch # User Kim Alvefur # Date 1687729995 -7200 # Node ID bc292c84f56c4613519aee1f16cf15a85f2f4781 # Parent b9821e9a21a2d13a5a10eb97a5308e05eaf13c6a 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. diff -r b9821e9a21a2 -r bc292c84f56c mod_pubsub_feeds/mod_pubsub_feeds.lua --- 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