axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-c-...@ws.apache.org
Subject [jira] Created: (AXISCPP-131) http authorization fails due to quoted string
Date Wed, 18 Aug 2004 16:07:19 GMT
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


Mime
View raw message