-
Notifications
You must be signed in to change notification settings - Fork 565
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
Nima: WebClient Proxy Support #6441
Conversation
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
2b49dd5
to
e8c8b1d
Compare
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
6ed5e41
to
623ea27
Compare
Signed-off-by: Jorge Bescos Gascon <[email protected]>
...webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/Http1ClientConnection.java
Outdated
Show resolved
Hide resolved
25c6709
to
127d608
Compare
Signed-off-by: Jorge Bescos Gascon <[email protected]>
...webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/Http1ClientConnection.java
Outdated
Show resolved
Hide resolved
nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ConnectionCache.java
Outdated
Show resolved
Hide resolved
nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/Proxy.java
Outdated
Show resolved
Hide resolved
nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/ConnectionKey.java
Outdated
Show resolved
Hide resolved
protected abstract void connect(Http1ClientConnection connection, InetSocketAddress remoteAddress) throws IOException; | ||
|
||
static void configure(Http1ClientConnection connection, InetSocketAddress remoteAddress) throws IOException { | ||
EstablishConnection connector = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed null assignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know from which JDK this is allowed, but good to know. Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only need to assign null
(or any other initialization) if the variable is not assigned in any of the possible flows. This is since ever.
bcac2e4
to
0ab0c06
Compare
Signed-off-by: Jorge Bescos Gascon <[email protected]>
c601fc1
to
163c2ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebClient should have a way, how to define proxy for overall client and not just per request. Please add this method as well.
...ebclient/webclient/src/test/java/io/helidon/nima/tests/integration/client/HttpProxyTest.java
Outdated
Show resolved
Hide resolved
...bclient/webclient/src/test/java/io/helidon/nima/tests/integration/client/HttpsProxyTest.java
Outdated
Show resolved
Hide resolved
nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/Proxy.java
Outdated
Show resolved
Hide resolved
nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/Proxy.java
Outdated
Show resolved
Hide resolved
...webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/Http1ClientConnection.java
Outdated
Show resolved
Hide resolved
...webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/Http1ClientConnection.java
Outdated
Show resolved
Hide resolved
BufferData data = BufferData.create(httpConnect.toString().getBytes(StandardCharsets.UTF_8)); | ||
writer.writeNow(data); | ||
DataReader reader = new DataReader(tempSocket); | ||
int statusCode = readStatusCode(reader); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use Http1StatusParser
instead of this readStatusCode
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using that one, but that one does not support HTTP 1.0. I tested that there are some proxies that, even when you send the request for HTTP 1.1, they respond with HTTP 1.0.
...webclient/webclient/src/main/java/io/helidon/nima/webclient/http1/Http1ClientConnection.java
Outdated
Show resolved
Hide resolved
nima/webclient/webclient/src/main/java/io/helidon/nima/webclient/Proxy.java
Outdated
Show resolved
Hide resolved
I went through all your comments @Verdent The missing part is still this comment: #6441 (review) I set this as a draft meanwhile I work on that. The other comments can be reviewed. |
a2168e5
to
93206af
Compare
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
This comment is also done: #6441 (review) |
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
b2b1085
to
486fa0e
Compare
Signed-off-by: Jorge Bescos Gascon <[email protected]>
It was already verified by Tomas and David is not available today
#6006
Supports proxy type HTTP/1.1.
It does not support proxy authentication so far.
Here is a new issue to complete missing parts: #7143