This is an automated email from the ASF dual-hosted git repository.
robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
The following commit(s) were added to refs/heads/master by this push:
new 3ba7f5fa95 AXIS2-6073, fix HTTPS support by getting 'scheme' from URI
instance
3ba7f5fa95 is described below
commit 3ba7f5fa95212cdb170dca13286c09f4e554ff83
Author: Robert Lazarski <[email protected]>
AuthorDate: Sat Dec 14 19:27:59 2024 -1000
AXIS2-6073, fix HTTPS support by getting 'scheme' from URI instance
---
.../axis2/transport/http/impl/httpclient5/RequestImpl.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5/RequestImpl.java
b/modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5/RequestImpl.java
index b51a004a57..f99430a32c 100644
---
a/modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5/RequestImpl.java
+++
b/modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5/RequestImpl.java
@@ -103,11 +103,19 @@ final class RequestImpl implements Request {
}
int port = requestUri.getPort();
String protocol;
+ // AXIS2-6073
+ // This may always be null here, HttpUriRequestBase has the scheme but
is unused?
+ // And also, protocol doesn't need to be set on HttpUriRequestBase?
if (this.httpRequestMethod.getVersion() != null &&
this.httpRequestMethod.getVersion().getProtocol() != null) {
protocol = this.httpRequestMethod.getVersion().getProtocol();
+ log.debug("Received protocol from
this.httpRequestMethod.getVersion().getProtocol(): " + protocol);
+ } else if (requestUri.getScheme() != null) {
+ protocol = requestUri.getScheme();
+ log.debug("Received protocol from requestUri.getScheme(): " +
protocol);
} else {
protocol = "http";
- }
+ log.warn("Cannot find protocol, using default as http on
requestUri: " + requestUri);
+ }
if (port == -1) {
if (HTTPTransportConstants.PROTOCOL_HTTP.equals(protocol)) {
port = 80;