In Debian bug 742215 [1], Jakup points out that the old User-Agent is
out-of-spec. From RFC 2616 [2]:
User-Agent = "User-Agent" ":" 1*( product | comment )
product = token ["/" product-version]
product-version = token
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
comment = "(" *( ctext | quoted-pair | comment ) ")"
ctext = <any TEXT excluding "(" and ")">
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742215
[2]: User-Agent: https://tools.ietf.org/html/rfc2616#section-14.43
product: https://tools.ietf.org/html/rfc2616#section-3.8
token, separators, comment, ctext:
https://tools.ietf.org/html/rfc2616#section-2.2
Reported-by: Jakub Wilk <jwilk@debian.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
v3.9 (unreleased)
+ * Fix non-compliant User-Agent header for HTTP/1.1.
* Fix an error in the NoToEmailAddress invocation.
* Add a new `trust-link` setting, to prefer the `link` attribute over the `id` attribute for identifying entries.
from . import util as _util
-_USER_AGENT = 'rss2email/{} +{}'.format(__version__, __url__)
+_USER_AGENT = 'rss2email/{} ({})'.format(__version__, __url__)
_feedparser.USER_AGENT = _USER_AGENT
_urllib_request.install_opener(_urllib_request.build_opener())
_SOCKET_ERRORS = []