configurable user agent string (#825)

This commit is contained in:
Athou
2018-07-31 15:21:45 +02:00
parent b3ce43eaf7
commit e9ef98716f
4 changed files with 12 additions and 1 deletions

View File

@@ -70,7 +70,10 @@ public class HttpGetter {
@Inject
public HttpGetter(CommaFeedConfiguration config) {
this.userAgent = String.format("CommaFeed/%s (https://github.com/Athou/commafeed)", config.getVersion());
this.userAgent = config.getApplicationSettings().getUserAgent();
if (this.userAgent == null) {
this.userAgent = String.format("CommaFeed/%s (https://github.com/Athou/commafeed)", config.getVersion());
}
}
public HttpResult getBinary(String url, int timeout) throws ClientProtocolException, IOException, NotModifiedException {