Commit bfd03e4
committed
AXIS2-6055 Restore preemptive Basic Auth support for HttpClient 5
The migration from HttpClient 4 to HttpClient 5 in Axis2 1.8 left a
TODO for preemptive authentication — getPreemptiveAuthentication()
was never checked, so credentials were only sent after a 401 challenge.
This broke users who relied on preemptive auth in Axis2 1.7.
When preemptiveAuthentication is true, set the Authorization header
directly on the request using java.util.Base64 (available since Java 8).
This bypasses the challenge/response flow, matching Axis2 1.7 behavior.1 parent f8944fa commit bfd03e4
1 file changed
Lines changed: 9 additions & 0 deletions
File tree
- modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
339 | 348 | | |
340 | 349 | | |
341 | 350 | | |
| |||
0 commit comments