Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-282

StringProvider may not work properly when trying to write an "Xml string"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.1
    • Fix Version/s: None
    • Component/s: Server

      Description

      Hi,

      StringProvider.getSize() returns t.length() even when the required charset is "UTF-8".
      That might be problematic for cases in which the string contains "2 bytes" letters - in that case the real stream length getting from the StringProvider.writeTo() will be greater compare to the StringProvider.getSize().

      The FlushResultHandler uses the provider to set the "Content-Length" to be the StringProvider.getSize() which is less that the real stream we write to the output!

      This is very problematic, in our case the client gets corrupted xml.

      Thanks in advance.
      Shay

        Attachments

          Activity

            People

            • Assignee:
              bluk Bryant Luk
              Reporter:
              shayts7 Shay Tsadok
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: