New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webclient doesnt support proxy server #617
Comments
@nischit7 I think the issue here is that Reactor Netty uses the functionality provided by Netty for proxying the requests, that functionality is based on If you need proxy server for testing purposes you can try Regards, |
@violetagg ... i think you didnt see my comment about squid proxy. |
Updated the test case as below. I installed hoverfly and squid on my local machine. Note the last 3 test cases 'webclientWithWireMockAsProxyServer', 'webclientWithSquidAsProxyServer' and 'webclientWithHoverflyAsProxyServer'. All these test cases will fail with webclient.
|
I ran
More about Then executed ################### I ran
Then executed ###################
################### Netty's HTTP proxy handler does I'm leaving this opened if you have more questions. |
@violetagg Thanks a lot for clarifying. In the beginning when you mentioned about CONNECT method, I didnt give enough attention. The moment I saw what you altered Squid proxy config for "allow CONNECT", it enlightened me. I am closing this ticket |
Any resolution for this now yet? |
Expected behavior
When webclient is intialized with proxy server configuration, HTTP calls should succeed.
Actual behavior
When one configures spring webclient with proxy server, it throws -
Steps to reproduce
Initially I was wondering if this has anything to do with my setup itself. That means, whether wiremock is doing proxy server role properly.
I then tried on spring rest template and did exactly the same as spring webclient (refer test case below). It succeeded. I also tried with local squid proxy server it succeeded too.
I also tried with other netty backed async HTTP clients (such as org.asynchttpclient). They succeeded with the setup.
Reactor Netty version
0.8.5.RELEASE
JVM version (e.g.
java -version
)java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
OS version (e.g.
uname -a
)16.7.0 Darwin Kernel Version 16.7.0: Sun Oct 28 22:30:19 PDT 2018; root:xnu-3789.73.27~1/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: