[
https://issues.jboss.org/browse/DROOLS-724?page=com.atlassian.jira.plugin...
]
Mario Fusco resolved DROOLS-724.
--------------------------------
Resolution: Won't Fix
What you're asking makes sense but the current Wagon API doesn't allow me to fix
this issue.
The problem here is that you could have multiple servers in your settings.xml file and
only one (or anyway a subset of them) could have been configured with the usePreemptive
flag. Conversely the WagonProvider interface allow me to create one single Wagon to be
used for all the http(s) requests. In other words there's no way to have different
Wagons configured for the different servers you may have in your settings.xml file so I am
obliged to use a minimal Wagon configuration.
Preemptive authentication in KIE Scanner
----------------------------------------
Key: DROOLS-724
URL:
https://issues.jboss.org/browse/DROOLS-724
Project: Drools
Issue Type: Bug
Components: kie server
Affects Versions: 6.1.0.Final
Reporter: Rares Vernica
Assignee: Mario Fusco
The pre-emptive authentication setting from Maven's settings.xml is not picked up by
Drools:
<server>
<id>guvnor-m2-repo</id>
<username>...</username>
<password>...</password>
<configuration>
<httpConfiguration>
<usePreemptive>true</usePreemptive>
</httpConfiguration>
</configuration>
</server>
I am not sure if the bug is in Drools or Wagon. To fix it, I made the pre-emptive always
true, but adding:
...
if ( "http".equals( roleHint ) || "https".equals(
roleHint ) ) {
HttpMethodConfiguration httpMethodConfiguration = new
HttpMethodConfiguration();
httpMethodConfiguration.setUsePreemptive( true );
HttpConfiguration httpConfiguration = new HttpConfiguration();
httpConfiguration.setAll( httpMethodConfiguration );
HttpWagon httpWagon = new HttpWagon();
httpWagon.setHttpConfiguration( httpConfiguration );
return httpWagon;
}
...
in Aether$ManualWagonProvider. This obviously is not a good solution.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)