Commit dfa58f76 authored by Cool Fire's avatar Cool Fire
Browse files

Use Last-Modified header instead of ETag

parent 00c6b043
Pipeline #51 passed with stage
in 19 seconds
......@@ -13,7 +13,7 @@ class Debiansecurity
@timer = timer
@feed_url = 'https://www.debian.org/security/dsa-long'
@feed_etag = ''
@feed_modi = ''
@feed_timer = 60
@channel = '#news'
......@@ -43,10 +43,10 @@ class Debiansecurity
agent = Mechanize.new
head = agent.head( @feed_url )
etag = head['ETag']
modi = head['Last-Modified']
if(etag != @feed_etag)
@feed_etag = etag
if(modi != @feed_modi)
@feed_modi = modi
# Grab rss
xml = agent.get( @feed_url ).body
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment