Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-755

RecommenderServlet response content types for XML and JSON

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.6
    • 0.6
    • classic

    Description

      In my opinion I believe the following changes should be made:

      For the writeJSON method, the content type should be changed from "text/plain" to "application/json". It's not as 'friendly' to some browsers but is more technically correct. See http://www.ietf.org/rfc/rfc4627.txt

      For the writeXML method, if you don't put the character encoding type into the same line at the content type, then the encoding type can be ignored and decoded as ASCII (see http://annevankesteren.nl/2005/03/text-xml). So you could change the content type from "text/xml" to "text/xml; charset=utf-8" but it's probably better to change it to "application/xml". See http://www.grauw.nl/blog/entry/489

      Attachments

        Activity

          People

            srowen Sean R. Owen
            jerbell Julian Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: