Skip to content

When using HttpComponentsClientHttpRequestFactory, setting a proxy through RequestConfig should not be ignored [SPR-12335] #16940

Closed

Description

@spring-projects-issues

Olivier Orand opened SPR-12335 and commented

Hi,
When using httpComponentsClientHttpRequestFactory, setting a proxy through RequestConfig is ignored.
But when this requestConfig is used by HttpClient, it isn't ignored.
It seems to be a "wiring" issue between Spring and HttpClient.
As workaround, setting a custom route planner can be use. Maybe there is a better workaround.

The maven project demonstrates a working case with HttpClient and failure with RestTemplate and with httpComponentsClientHttpRequestFactory.
Test project start an in memory proxy, and try to access a url resolvable only using proxy.

Regards,
Olivier


Affects: 4.0.5, 4.1.1

Reference URL: https://github.com/Orange-OpenSource/spring-http-proxy-testcase

Issue Links:

1 votes, 5 watchers

Activity

  1. spring-projects-issues commented on Dec 23, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Stéphane Nicoll, along with #15739, let's have a look at this one for 4.1.4 still...

    Juergen

  2. spring-projects-issues commented on Dec 24, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Stéphane Nicoll commented

    Thanks a lot for the project Olivier! This is strongly related to #17144 actually and with the current proposal your tests run fine against it (except a wrong assertion that should use an HttpStatus and not a raw code). I'll make sure to run your project against master once the proposal has been merged to make sure this issue is resolved as well.

  3. spring-projects-issues commented on Dec 29, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Stéphane Nicoll commented

    This was fixed as part of #17144

  4. spring-projects-issues commented on Jan 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Olivier Orand commented

    Hi Stéphane,
    Great, thanks for the fix.

    Olivier

  5. added
    type: enhancement
    status: duplicate
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webstatus: duplicatetype: enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions