8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

Fixed overriding default headers #50

Closed Coffee2CodeNL closed 7 years ago

Coffee2CodeNL commented 8 years ago
Q A
Bug fix? [yes]
New feature? [no]
BC breaks? [no]
Deprecations? [no]
Tests pass? [?]
Fixed tickets [#49]
License MIT
Doc PR [-]
Coffee2CodeNL commented 8 years ago

Fixes: https://github.com/8p/GuzzleBundle/issues/49

florianpreusner commented 8 years ago

First of all: Thanks for your contribution!

I'm not sure if that change is 100% correct. What happens if guzzle sets a header, any default header for example. Than you are not able to change this header by your configuration cause only headers which are not already defined can be set.

So, I understand your problem and it should be fixed of course. But maybe we need a different solution...

Coffee2CodeNL commented 8 years ago

I've checked it via XDebug, what comes in from the settings, and what comes in from the passed parameters, this should function as it should, as this prevents that headers loaded from the configuration file overwrite passed headers from the options array, at least, that's what i saw up until now.

I'll investigate a bit further

florianpreusner commented 7 years ago

Tested issue https://github.com/8p/GuzzleBundle/issues/49 with v5.2.1. Seems to work now, no changes required.