Skip to content

Commit bd62d69

Browse files
committed
OPL-11613 set authorization header only for target requests
1 parent 09177eb commit bd62d69

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>org.asynchttpclient</groupId>
2121
<artifactId>async-http-client-project</artifactId>
22-
<version>3.0.1.Apica</version>
22+
<version>3.0.1.Apica.1</version>
2323
</parent>
2424

2525
<modelVersion>4.0.0</modelVersion>

client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,10 @@ public NettyRequest newNettyRequest(Request request, boolean performConnectReque
242242
}
243243

244244
// don't override authorization but append
245-
addAuthorizationHeader(headers, perRequestAuthorizationHeader(request, realm));
245+
// set authorization header only for target requests
246+
if (!connect) {
247+
addAuthorizationHeader(headers, perRequestAuthorizationHeader(request, realm));
248+
}
246249
// only set proxy auth on request over plain HTTP, or when performing CONNECT
247250
if (!uri.isSecured() || connect) {
248251
setProxyAuthorizationHeader(headers, perRequestProxyAuthorizationHeader(request, proxyRealm));

pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<groupId>org.asynchttpclient</groupId>
2222
<artifactId>async-http-client-project</artifactId>
23-
<version>3.0.1.Apica</version>
23+
<version>3.0.1.Apica.1</version>
2424
<packaging>pom</packaging>
2525

2626
<name>AHC/Project</name>
@@ -387,7 +387,6 @@
387387
</executions>
388388
</plugin>
389389

390-
<!--
391390
<plugin>
392391
<groupId>org.apache.maven.plugins</groupId>
393392
<artifactId>maven-javadoc-plugin</artifactId>
@@ -401,6 +400,7 @@
401400
</execution>
402401
</executions>
403402
</plugin>
403+
<!--
404404
<plugin>
405405
<groupId>org.sonatype.plugins</groupId>
406406
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -434,7 +434,8 @@
434434
</configuration>
435435
</execution>
436436
</executions>
437-
</plugin>-->
437+
</plugin>
438+
-->
438439
</plugins>
439440
</build>
440441
</project>

0 commit comments

Comments
 (0)