Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-1059

HTTPTransport generates duplicate "Authentication: " headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • current (nightly)
    • current (nightly)
    • Transport (axis3)
    • None
    • Any

    Description

      Source file "axis/trunk/c/src/transport/axis3/HTTPTransport.cpp", line 360.
      When generateHTTPHeaders() calls setTransportProperty("Authorization", ...), the later does NOT replace existing "Authentication: " header but add another one. My application uses the same stub to call the same service repeatedly. This resulted in increasingly more and more duplicate "Authentication: " header being sent to the service. After a while, the service refuses the request.

      The common practice is that "set" replaces duplicate key/value pairs, while "add" implies the acceptance of duplicate keys. setTransportProperty(const char*, const char*) only remove duplicates of 3 know headers, "Connection", "Content-Length" and "SOAPAction". This is a design flaw. There should be two sibling member functions:

      setTransportProperty(const char*, const char*)
      addTransportProperty(const char*, const char*)

      Attachments

        Activity

          People

            nadiramra Nadir K. Amra
            mwc_tonesoft Michael Chen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: