File tree Expand file tree Collapse file tree
modules/transport/http/src/main/java/org/apache/axis2/transport/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ private static String findSOAPAction(MessageContext messageContext) {
495495
496496 public void setHTTPClientVersion (ConfigurationContext configurationContext ) {
497497 configurationContext .setProperty (HTTPTransportConstants .HTTP_CLIENT_VERSION ,
498- HTTPTransportConstants .HTTP_CLIENT_3_X_VERSION );
498+ HTTPTransportConstants .HTTP_CLIENT_5_X_VERSION );
499499 }
500500
501501}
Original file line number Diff line number Diff line change @@ -589,17 +589,10 @@ public void destroy() {
589589 // AXIS2-4898: MultiThreadedHttpConnectionManager starts a thread that is not stopped by the
590590 // shutdown of the connection manager. If we want to avoid a resource leak, we need to call
591591 // shutdownAll here.
592- // TODO - This action need be changed according to current HTTPClient.
593- String clientVersion = getHTTPClientVersion ();
594- if (clientVersion != null
595- && HTTPTransportConstants .HTTP_CLIENT_4_X_VERSION .equals (clientVersion )) {
596- // TODO - Handle for HTTPClient 4
597- } else {
598- try {
599- Class .forName ("org.apache.commons.httpclient.MultiThreadedHttpConnectionManager" ).getMethod ("shutdownAll" ).invoke (null );
600- } catch (Exception ex ) {
601- log .warn ("Failed to shut down MultiThreadedHttpConnectionManager" , ex );
602- }
592+ try {
593+ Class .forName ("org.apache.commons.httpclient.MultiThreadedHttpConnectionManager" ).getMethod ("shutdownAll" ).invoke (null );
594+ } catch (Exception ex ) {
595+ log .error ("Failed to shut down MultiThreadedHttpConnectionManager" , ex );
603596 }
604597
605598 }
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ public class HTTPTransportConstants {
4040
4141 //Settings to define HTTPClient version
4242 public static final String HTTP_CLIENT_VERSION = "http.client.version" ;
43- public static final String HTTP_CLIENT_3_X_VERSION = "http.client.version.3x" ;
44- public static final String HTTP_CLIENT_4_X_VERSION = "http.client.version.4x" ;
43+ public static final String HTTP_CLIENT_5_X_VERSION = "http.client.version.5x" ;
4544
4645 public static final String ANONYMOUS = "anonymous" ;
4746 public static final String PROXY_HOST_NAME = "proxy_host" ;
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public void cleanup(MessageContext msgContext) throws AxisFault {
6363
6464 public void setHTTPClientVersion (ConfigurationContext configurationContext ) {
6565 configurationContext .setProperty (HTTPTransportConstants .HTTP_CLIENT_VERSION ,
66- HTTPTransportConstants .HTTP_CLIENT_4_X_VERSION );
66+ HTTPTransportConstants .HTTP_CLIENT_5_X_VERSION );
6767 }
6868
6969
You can’t perform that action at this time.
0 commit comments