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 "Cyrille Le Clerc (JIRA)" <ax...@ws.apache.org> on 2005/06/13 00:35:46 UTC

[jira] Created: (AXIS-2047) HttpSender does not support redefinition of http header "Host"

HttpSender does not support redefinition of http header "Host"
--------------------------------------------------------------

         Key: AXIS-2047
         URL: http://issues.apache.org/jira/browse/AXIS-2047
     Project: Apache Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.2    
 Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
    Reporter: Cyrille Le Clerc
    Priority: Minor


HttpSender does not support redefinition of http header "Host".

If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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] Updated: (AXIS-2047) HttpSender does not support redefinition of http header "Host"

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

Jayachandra Sekhara Rao Sunkara updated AXIS-2047:
--------------------------------------------------

    type: Improvement  (was: Bug)

> HttpSender does not support redefinition of http header "Host"
> --------------------------------------------------------------
>
>          Key: AXIS-2047
>          URL: http://issues.apache.org/jira/browse/AXIS-2047
>      Project: Apache Axis
>         Type: Improvement
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
>     Reporter: Cyrille Le Clerc
>     Assignee: Jayachandra Sekhara Rao Sunkara
>     Priority: Minor
>  Attachments: AXIS-2047-2.patch, AXIS-2047.patch
>
> HttpSender does not support redefinition of http header "Host".
> If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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-2047) HttpSender does not support redefinition of http header "Host"

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

Davanum Srinivas reassigned AXIS-2047:
--------------------------------------

    Assign To: Jayachandra Sekhara Rao Sunkara

> HttpSender does not support redefinition of http header "Host"
> --------------------------------------------------------------
>
>          Key: AXIS-2047
>          URL: http://issues.apache.org/jira/browse/AXIS-2047
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
>     Reporter: Cyrille Le Clerc
>     Assignee: Jayachandra Sekhara Rao Sunkara
>     Priority: Minor
>  Attachments: AXIS-2047-2.patch, AXIS-2047.patch
>
> HttpSender does not support redefinition of http header "Host".
> If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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-2047) HttpSender does not support redefinition of http header "Host"

Posted by "Cyrille Le Clerc (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2047?page=comments#action_12317377 ] 

Cyrille Le Clerc commented on AXIS-2047:
----------------------------------------

   I don't see in the client API a way to specify a virtual host (Host http header) that is different from the host that is used to open the socket.

   I would like to have something like org.apache.commons.httpclient.params.HostParams#virtualHost in Jakarta Commons Http Client

> HttpSender does not support redefinition of http header "Host"
> --------------------------------------------------------------
>
>          Key: AXIS-2047
>          URL: http://issues.apache.org/jira/browse/AXIS-2047
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
>     Reporter: Cyrille Le Clerc
>     Assignee: Jayachandra Sekhara Rao Sunkara
>     Priority: Minor
>  Attachments: AXIS-2047-2.patch, AXIS-2047.patch
>
> HttpSender does not support redefinition of http header "Host".
> If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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] Updated: (AXIS-2047) HttpSender does not support redefinition of http header "Host"

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

Cyrille Le Clerc updated AXIS-2047:
-----------------------------------

    Attachment: AXIS-2047-2.patch

Enhancement of AXIS-2047.patch to use HTTPConstants.HEADER_HOST instead of "Host" 

> HttpSender does not support redefinition of http header "Host"
> --------------------------------------------------------------
>
>          Key: AXIS-2047
>          URL: http://issues.apache.org/jira/browse/AXIS-2047
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
>     Reporter: Cyrille Le Clerc
>     Priority: Minor
>  Attachments: AXIS-2047-2.patch, AXIS-2047.patch
>
> HttpSender does not support redefinition of http header "Host".
> If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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] Updated: (AXIS-2047) HttpSender does not support redefinition of http header "Host"

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

Cyrille Le Clerc updated AXIS-2047:
-----------------------------------

    Attachment: AXIS-2047.patch

patch to support definition of "Host" http header through msgContext.property(HTTPConstants.REQUEST_HEADERS) in HTTPSender 

> HttpSender does not support redefinition of http header "Host"
> --------------------------------------------------------------
>
>          Key: AXIS-2047
>          URL: http://issues.apache.org/jira/browse/AXIS-2047
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
>     Reporter: Cyrille Le Clerc
>     Priority: Minor
>  Attachments: AXIS-2047.patch
>
> HttpSender does not support redefinition of http header "Host".
> If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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-2047) HttpSender does not support redefinition of http header "Host"

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

Jayachandra Sekhara Rao Sunkara commented on AXIS-2047:
-------------------------------------------------------

I think URL specified inside msgContext object for the property HTTPConstants.TRANS_URL should supercede any other Host related properties registered inside the msgContexts properties bag. This property too is one the user specifies through something like Call.setTargetEndpointAddress(URL) and isn't anywhere added by Axis on it own. The reported problem can arise only when user says he is using some TargetEndpointAddress and yet again goes to experiment with the HTTPConstants.REQUEST_HEADERS trying to insert extraneous Host information. But the later is something that is very unreliable, and hence should not supercede the way Axis identifies its Host.
I feel what Axis does is quite right and doesn't need patching in this regard. The REQUEST_HEADERS is only taken into consideration for properties such as HEADER_CONNECTION, HEADER_EXPECT and HEADER_TRANSFER_ENCODING *which* are otherwise can't be set with the projected client API for Call. And hence it should not be used to set duplicate values for certain headers that already are taken into account by Axis. Even if someone tries to do so, Axis' HTTPSender is wise enough to ignore them.

Should the reporter not have any complaints about the explanation. This bug can be closed as user error.

> HttpSender does not support redefinition of http header "Host"
> --------------------------------------------------------------
>
>          Key: AXIS-2047
>          URL: http://issues.apache.org/jira/browse/AXIS-2047
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment:  Axis java, 1.1 and 1.2, unix/windows platforms
>     Reporter: Cyrille Le Clerc
>     Assignee: Jayachandra Sekhara Rao Sunkara
>     Priority: Minor
>  Attachments: AXIS-2047-2.patch, AXIS-2047.patch
>
> HttpSender does not support redefinition of http header "Host".
> If the developper defines "Host" header in msgContext.property(HTTPConstants.REQUEST_HEADERS), then this header is declared twice in the Http request ; the developper defined value is the second one and thus ignored by the target server.

-- 
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