Skip to content

Commit ce9ca3c

Browse files
committed
Fix HTTP proxy user/password
1 parent f38c8ea commit ce9ca3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

quickfixj-core/src/main/java/quickfix/mina/ProtocolFactory.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static ProxyConnector createIoProxyConnector(SocketConnector socketConnec
133133
connector.setConnectTimeoutMillis(5000);
134134

135135
if (proxyType.equalsIgnoreCase("http")) {
136-
req = createHttpProxyRequest(address, proxyVersion, proxyUser, proxyDomain, proxyWorkstation);
136+
req = createHttpProxyRequest(address, proxyVersion, proxyUser, proxyPassword, proxyDomain, proxyWorkstation);
137137
} else if (proxyType.equalsIgnoreCase("socks")) {
138138
req = createSocksProxyRequest(address, proxyVersion, proxyUser, proxyPassword);
139139
} else {
@@ -157,12 +157,13 @@ public static ProxyConnector createIoProxyConnector(SocketConnector socketConnec
157157
private static ProxyRequest createHttpProxyRequest(InetSocketAddress address,
158158
String proxyVersion,
159159
String proxyUser,
160+
String proxyPassword,
160161
String proxyDomain,
161162
String proxyWorkstation) {
162163
String uri = "http://" + address.getAddress().getHostAddress() + ":" + address.getPort();
163164
HashMap<String, String> props = new HashMap<>();
164165
props.put(HttpProxyConstants.USER_PROPERTY, proxyUser);
165-
props.put(HttpProxyConstants.PWD_PROPERTY, proxyUser);
166+
props.put(HttpProxyConstants.PWD_PROPERTY, proxyPassword);
166167
if (proxyDomain != null && proxyWorkstation != null) {
167168
props.put(HttpProxyConstants.DOMAIN_PROPERTY, proxyDomain);
168169
props.put(HttpProxyConstants.WORKSTATION_PROPERTY, proxyWorkstation);

0 commit comments

Comments
 (0)