Problem/Motivation
When adding multiple headers then the following errors appear:
InvalidArgumentException: "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\r " is not valid header value. in GuzzleHttp\Psr7\Request->assertValue() (line 260 of /var/www/html/vendor/guzzlehttp/psr7/src/MessageTrait.php).
The problem is that headers exploded by "\n", but itis possible that the "\r" exists at the end of the header.
Proposed resolution
Add trim to the: Drupal\stage_file_proxy\EventSubscriber\StageFileProxySubscriber::createProxyHeadersArray
Issue fork stage_file_proxy-3541305
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dench0Comment #3
dench0Comment #5
dench0Comment #7
smustgrave commentedFine with this change thanks!