Skip to content

Commit

Permalink
Fix en_GB "Accept-Language" header handling. Using the underscore was…
Browse files Browse the repository at this point in the history
… causing an error 400.
  • Loading branch information
mherger committed Jan 28, 2022
1 parent f47b7a7 commit f98f746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Slim/Networking/SimpleHTTP/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sub put { shift->_createHTTPRequest( PUT => @_ ) }
sub head { shift->_createHTTPRequest( HEAD => @_ ) }

sub hasSSL { if (!main::SCANNER) {
Slim::Networking::Async::HTTP->hasSSL()
Slim::Networking::Async::HTTP->hasSSL()
} }

sub _createHTTPRequest {
Expand Down Expand Up @@ -141,6 +141,7 @@ sub _createHTTPRequest {
}

$lang ||= $prefs->get('language') || 'en';
$lang =~ s/_/-/g;

unshift @_, (
'Accept-Language' => lc($lang),
Expand Down

0 comments on commit f98f746

Please sign in to comment.