axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Westner (JIRA)" <>
Subject [jira] Created: (AXIS-2337) 1.3 PATCH: fix for NPE in CommonsHTTPSender when maintaining session and using a proxy
Date Tue, 13 Dec 2005 16:52:45 GMT
1.3  PATCH: fix for NPE in CommonsHTTPSender when maintaining session and using a proxy

         Key: AXIS-2337
     Project: Apache Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.3    
 Environment: Using axis with a http proxy, maintaining session, using commons-httpclient,
verfied on OS X 10.4 and WinXP
    Reporter: Dominik Westner
    Priority: Minor

When using CommonsHTTPSender, maintaining the session and using a proxy, invoke will throw
a NPE, because the hostconfiguration of the commons httpclient does not have a host set.

Changed the source to get the information from targetURL instead of the hostconfiguration
which seems to be more apporpriate anyway.
See patch below.


Index: src/org/apache/axis/transport/http/
--- src/org/apache/axis/transport/http/   (revision 128)
+++ src/org/apache/axis/transport/http/   (working copy)
@@ -185,9 +185,9 @@
             if (msgContext.getMaintainSession()) {
                 HttpState state = httpClient.getState();
-                String host = hostConfiguration.getHost();
+                String host = targetURL.getHost();
                 String path = targetURL.getPath();
-                boolean secure = hostConfiguration.getProtocol().isSecure();
+                boolean secure = targetURL.getProtocol().equalsIgnoreCase("https");
                 fillHeaders(msgContext, state, HTTPConstants.HEADER_COOKIE, host, path, secure);
                 fillHeaders(msgContext, state, HTTPConstants.HEADER_COOKIE2, host, path,

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message