Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1963

Custom HTTP headers missing with CURL NetAccessor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.1.3, 3.1.4, 3.2.1, 3.2.2
    • 3.2.3
    • Utilities
    • Xerces-c 3.1.1
      curl_version: libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
      Mac OS X 10.6.7, i686-apple-darwin10-g++-4.2.1

    Description

      It seems that the custom headers set using XMLNetHTTPInfo are missing from the actual HTTP request when the CURLNetAccessor is used. The SocketNetAccessor does not show this problem.

      The headerList in the CurlURLInputStream constructor is correctly built but from what I understand of the CURL documentation the list cannot be freed until the GET request has been made. Currently the list feed right after setting the CURLOPT_HTTPHEADER. Delaying the call curl_slist_free_all to the destructor solves the issue (patch attached).

      Attachments

        Issue Links

          Activity

            People

              scantor Scott Cantor
              eric.swalens@gmail.com Eric Swalens
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: