diff options
| author | Anthony Lavado <anthony@lavado.ca> | 2020-08-26 13:00:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-26 13:00:51 -0400 |
| commit | 8510333bcc5c8b0ca204939ecc672cef7c6a5710 (patch) | |
| tree | 533dff4571813baf84c9f62a19786b6ae2f91f16 | |
| parent | 4f6c98b325aa544ac1f3a522ea668b3f990265e3 (diff) | |
| parent | 5be87753d694f17d400a80070ccd83926b1e5fb3 (diff) | |
Merge pull request #3983 from Bond-009/useragent
Fix incorrect adding of user agent
| -rw-r--r-- | MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs index 3550614dd..7f10e6922 100644 --- a/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs +++ b/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs @@ -740,11 +740,11 @@ namespace MediaBrowser.Providers.Music // MusicBrainz request a contact email address is supplied, as comment, in user agent field: // https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting#User-Agent - options.Headers.UserAgent.Add(new ProductInfoHeaderValue(string.Format( + options.Headers.UserAgent.ParseAdd(string.Format( CultureInfo.InvariantCulture, "{0} ( {1} )", _appHost.ApplicationUserAgent, - _appHost.ApplicationUserAgentAddress))); + _appHost.ApplicationUserAgentAddress)); HttpResponseMessage response; var attempts = 0u; diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs index 51c0b7e83..d8918bb6b 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs @@ -382,7 +382,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies /// </summary> internal Task<HttpResponseMessage> GetMovieDbResponse(HttpRequestMessage message) { - message.Headers.UserAgent.Add(new ProductInfoHeaderValue(_appHost.ApplicationUserAgent)); + message.Headers.UserAgent.ParseAdd(_appHost.ApplicationUserAgent); return _httpClientFactory.CreateClient().SendAsync(message); } |
