File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5 Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -103,11 +103,19 @@ final class RequestImpl implements Request {
103103 }
104104 int port = requestUri .getPort ();
105105 String protocol ;
106+ // AXIS2-6073
107+ // This may always be null here, HttpUriRequestBase has the scheme but is unused?
108+ // And also, protocol doesn't need to be set on HttpUriRequestBase?
106109 if (this .httpRequestMethod .getVersion () != null && this .httpRequestMethod .getVersion ().getProtocol () != null ) {
107110 protocol = this .httpRequestMethod .getVersion ().getProtocol ();
111+ log .debug ("Received protocol from this.httpRequestMethod.getVersion().getProtocol(): " + protocol );
112+ } else if (requestUri .getScheme () != null ) {
113+ protocol = requestUri .getScheme ();
114+ log .debug ("Received protocol from requestUri.getScheme(): " + protocol );
108115 } else {
109116 protocol = "http" ;
110- }
117+ log .warn ("Cannot find protocol, using default as http on requestUri: " + requestUri );
118+ }
111119 if (port == -1 ) {
112120 if (HTTPTransportConstants .PROTOCOL_HTTP .equals (protocol )) {
113121 port = 80 ;
You can’t perform that action at this time.
0 commit comments