You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by ax...@ws.apache.org on 2004/08/18 18:07:19 UTC

[jira] Created: (AXISCPP-131) http authorization fails due to quoted string

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXISCPP-131

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXISCPP-131
    Summary: http authorization fails due to quoted string
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis-C++
 Components: 
             Basic Architecture
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Brian Stromquist

    Created: Wed, 18 Aug 2004 9:06 AM
    Updated: Wed, 18 Aug 2004 9:06 AM
Environment: WinXP development - Unknown axis and http server implementation.

Description:
The server for this application requires the http header block to have an Authorization line:

Authorization: Basic b2R5YWRtaW46MTIzNA==

I used the following call to put the line in the header:

ws.setTransportProperty("Authorization", "Basic b2R5YWRtaW46MTIzNA==");

When the message is sent, its http header looks like this:

POST /prov/services/Ping HTTP/1.1
Host: xx.yy.zz.26:80
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Accept: "application/soap+xml, application/dime, multipart/related, text"
Authorization: "Basic b2R5YWRtaW46MTIzNA=="
Content-Length: 361

The server issues an "Unable to authenticate" error.  If you take away the quotes on the Authorization line, it works as expected.

I made the following patch to HttpTransport.cpp to confirm this:

HttpTransport::HTTPBind ()

   /* Set header values for additional prefixes, such as SOAPAction */
    for (unsigned int i = 0; i < m_AdditionalHeader.size (); i++)
    {
	if ((m_AdditionalHeader[i].first == "Content-Length")
		|| (m_AdditionalHeader[i].first == "Authorization"))
	{

in place of:

  /* Set header values for additional prefixes, such as SOAPAction */
    for (unsigned int i = 0; i < m_AdditionalHeader.size (); i++)
    {
	if (m_AdditionalHeader[i].first == "Content-Length")
	{




---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-131) http authorization fails due to quoted string

Posted by ax...@ws.apache.org.
Message:

   The following issue has been closed.

   Resolver: Samisa Abeysinghe
       Date: Wed, 8 Sep 2004 6:30 AM

Now no quotes are added for HTTP headers except for SOAPAction.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXISCPP-131

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXISCPP-131
    Summary: http authorization fails due to quoted string
       Type: Bug

     Status: Closed
   Priority: Critical
 Resolution: FIXED

    Project: Axis-C++
 Components: 
             Basic Architecture
   Fix Fors:
             1.3 Beta
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Brian Stromquist

    Created: Wed, 18 Aug 2004 9:06 AM
    Updated: Wed, 8 Sep 2004 6:30 AM
Environment: WinXP development - Unknown axis and http server implementation.

Description:
The server for this application requires the http header block to have an Authorization line:

Authorization: Basic b2R5YWRtaW46MTIzNA==

I used the following call to put the line in the header:

ws.setTransportProperty("Authorization", "Basic b2R5YWRtaW46MTIzNA==");

When the message is sent, its http header looks like this:

POST /prov/services/Ping HTTP/1.1
Host: xx.yy.zz.26:80
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Accept: "application/soap+xml, application/dime, multipart/related, text"
Authorization: "Basic b2R5YWRtaW46MTIzNA=="
Content-Length: 361

The server issues an "Unable to authenticate" error.  If you take away the quotes on the Authorization line, it works as expected.

I made the following patch to HttpTransport.cpp to confirm this:

HttpTransport::HTTPBind ()

   /* Set header values for additional prefixes, such as SOAPAction */
    for (unsigned int i = 0; i < m_AdditionalHeader.size (); i++)
    {
	if ((m_AdditionalHeader[i].first == "Content-Length")
		|| (m_AdditionalHeader[i].first == "Authorization"))
	{

in place of:

  /* Set header values for additional prefixes, such as SOAPAction */
    for (unsigned int i = 0; i < m_AdditionalHeader.size (); i++)
    {
	if (m_AdditionalHeader[i].first == "Content-Length")
	{




---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira