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

Command icon 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

dench0 created an issue. See original summary.

dench0’s picture

Title: ... is not valid header value » ... is not valid header value. in GuzzleHttp\Psr7\Request->assertValue() (line 260 of /var/www/html/vendor/guzzlehttp/psr7/src/MessageTrait.php).
dench0’s picture

Issue summary: View changes

dench0’s picture

Status: Active » Needs review

smustgrave’s picture

Status: Needs review » Fixed

Fine with this change thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.