diff options
author | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2006-02-09 17:49:24 +0000 |
---|---|---|
committer | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2006-02-09 17:49:24 +0000 |
commit | 47021b0367be82aed207ccc2a6137882d9c93398 (patch) | |
tree | 29168a0950ffc677bd0a7acb4380a06354347177 /lib/feed2imap | |
parent | c3cb06028dd0acf29ebd22fd5e1899442040540e (diff) | |
download | feed2imap-47021b0367be82aed207ccc2a6137882d9c93398.tar.gz feed2imap-47021b0367be82aed207ccc2a6137882d9c93398.tar.bz2 feed2imap-47021b0367be82aed207ccc2a6137882d9c93398.zip |
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@83 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to '')
-rw-r--r-- | lib/feed2imap/httpfetcher.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/feed2imap/httpfetcher.rb b/lib/feed2imap/httpfetcher.rb index c7a92c7..1d82b53 100644 --- a/lib/feed2imap/httpfetcher.rb +++ b/lib/feed2imap/httpfetcher.rb @@ -29,6 +29,8 @@ require 'uri' # max number of redirections MAXREDIR = 5 +HTTPDEBUG = true + # Class used to retrieve the feed over HTTP class HTTPFetcher def HTTPFetcher::fetcher(baseuri, uri, lastcheck, recursion) @@ -66,7 +68,10 @@ class HTTPFetcher return response.body when Net::HTTPRedirection # if not modified - return nil if Net::HTTPNotModified === response + if Net::HTTPNotModified === response + puts "HTTPNotModified on #{uri}" if HTTPDEBUG + return nil + end if recursion > 0 redir = URI::join(uri.to_s, response['location']) return fetcher(baseuri, redir, lastcheck, recursion - 1) |