RuudBurger/CouchPotatoServer — pull request #1803 by gkroone (2013-06-01 12:44:17+00:00)
Title: Update base.py

# Passing a hostname in the referer field causes problems with my indexer (nzb.ag), which uses CloudFlare and SSL. As the RFC states the Referer field is an optional field, I've chosen to comment out the line.

If this field was added for compatibility with other websites, an alternative could be to pass the full URL instead of just a hostname, but this doesn't make much sense as referer as it should really be the page that presented you with the link, not the URL we're trying to access.

headers['Referer'] = headers.get('Referer', url)

Without the update, the following log entry is shown in my logs.

06-01 14:38:36 ERROR [hpotato.core.plugins.base] Failed opening url in Newznab: https://nzb.ag/api?t=movie&imdbid=2034139&apikey=xxx&extended=1 Traceback (most recent call last):
File "/volume1/@appstore/couchpotatoserver/share/CouchPotatoServer/couchpotato/core/plugins/base.py", line 149, in urlopen
response = urllib2.urlopen(request, timeout = timeout)
HTTPError: HTTP Error 403: Forbidden

After the update, the above error is no longer showing.