You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Subbarao Ayyagari (JIRA)" <ax...@ws.apache.org> on 2005/06/08 20:58:21 UTC

[jira] Created: (AXIS-2044) CommonsHTTPSender - Hardcoded Host Configuration Port

CommonsHTTPSender - Hardcoded Host Configuration Port
-----------------------------------------------------

         Key: AXIS-2044
         URL: http://issues.apache.org/jira/browse/AXIS-2044
     Project: Axis
        Type: Bug
    Versions: 1.2    
 Environment: all
    Reporter: Subbarao Ayyagari


CommonsHTTPSender.java hardcodes the port to 80 for all protocols if no port is specified exclusively in the URL.  Here is the code snippet that does that:

    protected HostConfiguration getHostConfiguration(HttpClient client, 
                                                     MessageContext context,
                                                     URL targetURL) {
        TransportClientProperties tcp = 
            TransportClientPropertiesFactory.create(targetURL.getProtocol()); // http or https
        int port = targetURL.getPort();
        boolean hostInNonProxyList =
            isHostInNonProxyList(targetURL.getHost(), tcp.getNonProxyHosts());
        
        HostConfiguration config = new HostConfiguration();
        
        if (port == -1) {
            port = 80;          // even for https
        }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2044) CommonsHTTPSender - Hardcoded Host Configuration Port

Posted by "Subbarao Ayyagari (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2044?page=comments#action_12313077 ] 

Subbarao Ayyagari commented on AXIS-2044:
-----------------------------------------

Instead of hardcoding port=80, it should've done

if (port == -1) {
    port = targetURL.getDefaultPort();
}

This'll assign 443 port to the HostConfiguration for HTTPS. I've tried this patch against my local environment for a WS that uses SSL and it works fine now. Without this patch, the targetURL ends up trying to communicate to https://myurl:80/myendpoint.

> CommonsHTTPSender - Hardcoded Host Configuration Port
> -----------------------------------------------------
>
>          Key: AXIS-2044
>          URL: http://issues.apache.org/jira/browse/AXIS-2044
>      Project: Axis
>         Type: Bug
>     Versions: 1.2
>  Environment: all
>     Reporter: Subbarao Ayyagari

>
> CommonsHTTPSender.java hardcodes the port to 80 for all protocols if no port is specified exclusively in the URL.  Here is the code snippet that does that:
>     protected HostConfiguration getHostConfiguration(HttpClient client, 
>                                                      MessageContext context,
>                                                      URL targetURL) {
>         TransportClientProperties tcp = 
>             TransportClientPropertiesFactory.create(targetURL.getProtocol()); // http or https
>         int port = targetURL.getPort();
>         boolean hostInNonProxyList =
>             isHostInNonProxyList(targetURL.getHost(), tcp.getNonProxyHosts());
>         
>         HostConfiguration config = new HostConfiguration();
>         
>         if (port == -1) {
>             port = 80;          // even for https
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-2044) CommonsHTTPSender - Hardcoded Host Configuration Port

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2044?page=all ]
     
Jayachandra Sekhara Rao Sunkara resolved AXIS-2044:
---------------------------------------------------

    Resolution: Fixed

Taken care!

> CommonsHTTPSender - Hardcoded Host Configuration Port
> -----------------------------------------------------
>
>          Key: AXIS-2044
>          URL: http://issues.apache.org/jira/browse/AXIS-2044
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2
>  Environment: all
>     Reporter: Subba Ayyagari
>     Assignee: Jayachandra Sekhara Rao Sunkara

>
> CommonsHTTPSender.java hardcodes the port to 80 for all protocols if no port is specified exclusively in the URL.  Here is the code snippet that does that:
>     protected HostConfiguration getHostConfiguration(HttpClient client, 
>                                                      MessageContext context,
>                                                      URL targetURL) {
>         TransportClientProperties tcp = 
>             TransportClientPropertiesFactory.create(targetURL.getProtocol()); // http or https
>         int port = targetURL.getPort();
>         boolean hostInNonProxyList =
>             isHostInNonProxyList(targetURL.getHost(), tcp.getNonProxyHosts());
>         
>         HostConfiguration config = new HostConfiguration();
>         
>         if (port == -1) {
>             port = 80;          // even for https
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXIS-2044) CommonsHTTPSender - Hardcoded Host Configuration Port

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2044?page=all ]

Davanum Srinivas reassigned AXIS-2044:
--------------------------------------

    Assign To: Jayachandra Sekhara Rao Sunkara

> CommonsHTTPSender - Hardcoded Host Configuration Port
> -----------------------------------------------------
>
>          Key: AXIS-2044
>          URL: http://issues.apache.org/jira/browse/AXIS-2044
>      Project: Axis
>         Type: Bug
>     Versions: 1.2
>  Environment: all
>     Reporter: Subbarao Ayyagari
>     Assignee: Jayachandra Sekhara Rao Sunkara

>
> CommonsHTTPSender.java hardcodes the port to 80 for all protocols if no port is specified exclusively in the URL.  Here is the code snippet that does that:
>     protected HostConfiguration getHostConfiguration(HttpClient client, 
>                                                      MessageContext context,
>                                                      URL targetURL) {
>         TransportClientProperties tcp = 
>             TransportClientPropertiesFactory.create(targetURL.getProtocol()); // http or https
>         int port = targetURL.getPort();
>         boolean hostInNonProxyList =
>             isHostInNonProxyList(targetURL.getHost(), tcp.getNonProxyHosts());
>         
>         HostConfiguration config = new HostConfiguration();
>         
>         if (port == -1) {
>             port = 80;          // even for https
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira