Support null media type in TypeString (auto-detect XML/HTML/TXT)

Description

Zanata Platform doesn't model media types at the message level, which makes it hard to choose a good media type for TypeString when integrating with MT (eg https://github.com/zanata/zanata-platform/pull/1015 changed from HTML to XML, which has a different set of trade-offs).

We should be able to handle more use cases by letting Zanata not specify a media type, and having Magpie automatically try XML, HTML, TXT, in that order.

If the XML parsing fails (eg not well-formed), we try HTML parsing. If that fails (eg bad entity encoding), we fall back on plain text.

Naturally, in cases where Zanata is sure of the media type, it doesn't have to pass null to Magpie. But by making media type optional, Magpie should be able to support a greater range of Zanata's use cases.

relates to

Activity

Show:

Details

Assignee

Reporter

Sprint

Priority

More fields

Created 16 August 2018 at 06:12
Updated 19 November 2019 at 06:18

Flag notifications