16
16
*/
17
17
package org .asynchttpclient ;
18
18
19
- import org .asynchttpclient .util .AsyncHttpProviderUtils ;
20
19
import org .asynchttpclient .util .StandardCharsets ;
21
20
22
- import java .net .URI ;
23
21
import java .nio .charset .Charset ;
24
22
import java .util .ArrayList ;
25
23
import java .util .Collections ;
@@ -55,7 +53,7 @@ public String toString() {
55
53
private final String principal ;
56
54
private final String password ;
57
55
private final int port ;
58
- private final URI uri ;
56
+ private final String url ;
59
57
private String encoding = StandardCharsets .UTF_8 .name ();
60
58
private Charset charset = StandardCharsets .UTF_8 ;
61
59
private String ntlmDomain = System .getProperty ("http.auth.ntlm.domain" , "" );
@@ -66,7 +64,7 @@ public ProxyServer(final Protocol protocol, final String host, final int port, S
66
64
this .port = port ;
67
65
this .principal = principal ;
68
66
this .password = password ;
69
- this . uri = AsyncHttpProviderUtils . createNonEmptyPathURI ( toString ()) ;
67
+ url = protocol + "://" + host + ":" + port ;
70
68
}
71
69
72
70
public ProxyServer (final String host , final int port , String principal , String password ) {
@@ -119,8 +117,8 @@ public Charset getCharset() {
119
117
return charset ;
120
118
}
121
119
122
- public URI getURI () {
123
- return uri ;
120
+ public String getUrl () {
121
+ return url ;
124
122
}
125
123
126
124
public ProxyServer addNonProxyHost (String uri ) {
@@ -148,6 +146,6 @@ public String getNtlmDomain() {
148
146
149
147
@ Override
150
148
public String toString () {
151
- return protocol + "://" + host + ":" + port ;
149
+ return url ;
152
150
}
153
151
}
0 commit comments