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

Accessing the HTTP Content-Type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • Miscellaneous
    • None

    Description

      A lot of algorithms need access to the HTTP "Content-Type" header, to decide how to parse a file, or what encoding it is in - for instance see XSLT 2.0's unparsed-text() function:

      http://www.w3.org/TR/xslt20/#unparsed-text

      We should add a method, BinInputStream::getContentType(), and implement it in the HTTP input stream implementations. The method should return 0 when the content type is not available, like for file input streams.

      In addition, the socket and WinSock HTTP InputStream implementations have a number of problems:

      1) They used fixed buffers which can result in buffer overflow.
      2) They needlessly duplicate a whole load of code that could be shared.
      3) They transcode to the local code page rather than "ISO8859-1".

      Attachments

        1. xercesc_3_0_content_type_patch
          81 kB
          John Snelson
        2. curl_and_local_code_page_patch
          34 kB
          John Snelson

        Activity

          People

            bsk Boris Kolpackov
            jpcs John Snelson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: