tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TIKA-1800) MediaType#parse does not decode escaped special characters
Date Sun, 21 May 2017 15:40:12 GMT

     [ https://issues.apache.org/jira/browse/TIKA-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris A. Mattmann updated TIKA-1800:
------------------------------------
    Fix Version/s:     (was: 1.15)
                   1.16

> MediaType#parse does not decode escaped special characters
> ----------------------------------------------------------
>
>                 Key: TIKA-1800
>                 URL: https://issues.apache.org/jira/browse/TIKA-1800
>             Project: Tika
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.11
>            Reporter: Roberto Benedetti
>             Fix For: 1.16
>
>
> Special characters in parameter value are escaped in canonical string representation
but they are not unescaped when the canonical string representation is parsed.
> {code:java}
> MediaType mType = new MediaType(MediaType.APPLICATION_XML, "x-report", "#report@");
> String cType = mType.toString(); // application/xml; x-report="#report\@"
> assertEquals("application/xml; x-report=\"#report\\@\"", cType); // success
> mType = MediaType.parse(cType);
> String report = mType.getParameters().get("x-report"); // #report\@
> assertEquals("#report@", report); // failure
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message