Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2408

amedia does not preserve the content type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 7.0.2, 6.5.7
    • Components
    • Tomcat 7 on Windows 7 and Firefox 24

      The content type provided to the constructor of AMedia seems to be modified.
      In the following example the first iframe should show accented vowels and the second question marks, but the opposite is true.

      <zk>
      	<zscript><![CDATA[
      	InputStream is1 = new ByteArrayInputStream("\u00e0\u00e8\u00ec\u00f2\u00f9".getBytes("ISO-8859-1"));
      	AMedia media1 = new AMedia("accented_1.txt", "txt", "text/plain; charset=ISO-8859-1", is1);
      	InputStream is2 = new ByteArrayInputStream("\u00e0\u00e8\u00ec\u00f2\u00f9".getBytes("UTF-8"));
      	AMedia media2 = new AMedia("accented_2.txt", "txt", "text/plain; charset=ISO-8859-1", is2);
      	]]></zscript>
              <iframe content="${media1}" />
              <iframe content="${media2}" />
      </zk>
      

            Unassigned Unassigned
            benedetti benedetti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: