You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2023/03/07 06:56:00 UTC

[jira] [Created] (MRESOLVER-339) Preemptive broken when default ports used

Tamas Cservenak created MRESOLVER-339:
-----------------------------------------

             Summary: Preemptive broken when default ports used
                 Key: MRESOLVER-339
                 URL: https://issues.apache.org/jira/browse/MRESOLVER-339
             Project: Maven Resolver
          Issue Type: Bug
          Components: Resolver
            Reporter: Tamas Cservenak


The feature implemented in MRESOLVER-315 is broken when default HTTP or HTTPS ports (80 or 443 respectively) are used, as in majority of public servers.

The SharingAuthCache "converts" the HttpHost to port-normalized one, but the code to activate preemptive tampers directly with shared state (not AuthCache), hence in these cases, it is not activated properly due key mismatch. Ironically, as UT does test this feature but are unable to open ports 80 or 443, the feature works ok.

Fix: migrate to HttpClient 4.3+ HttpClientContext that has type safe setters/getters exposed, and HttpTransport should do things "by the book" (use authCache) that underlying implementation them sorts out proper keying.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)