Skip to content

Inconsistancy with guzzle when it comes to proxy option #343

@fliespl

Description

@fliespl
Q A
Symfony version 6/7
Bundle version 8x

In file: https://github.com/8p/EightPointsGuzzleBundle/blob/v8.5.1/src/DependencyInjection/Configuration.php

There is proxy configuration which takes string or arrays. When string is given, it's converted to array in format: [http => IP] (meaning only http requests get proxies).

                            ->arrayNode('proxy')
                                ->beforeNormalization()
                                ->ifString()
                                    ->then(function($v) { return ['http'=> $v]; })
                                ->end()

In guzzle ( https://docs.guzzlephp.org/en/stable/request-options.html#proxy ) passing proxy as string makes it work for all protocols:

Pass a string to specify a proxy for all protocols.

$client->request('GET', '/', ['proxy' => 'http://localhost:8125']);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions