From 58521a45067f5c4fa558cb090480fa4b2e407056 Mon Sep 17 00:00:00 2001 From: Jonathan Hedley Date: Thu, 23 Nov 2023 14:19:43 +1100 Subject: [PATCH] Allow any XML mimetype in Connection Fixes #2059 --- CHANGES | 4 + .../java/org/jsoup/helper/HttpConnection.java | 6 +- .../org/jsoup/integration/ConnectTest.java | 29 ++- src/test/resources/htmltests/osi-logo.svg | 185 ++++++++++++++++++ 4 files changed, 218 insertions(+), 6 deletions(-) create mode 100644 src/test/resources/htmltests/osi-logo.svg diff --git a/CHANGES b/CHANGES index dc6a0ebb86..1927c28159 100644 --- a/CHANGES +++ b/CHANGES @@ -37,6 +37,10 @@ Release 1.17.1 [PENDING] which caused that pinning. + * Improvement: in Jsoup.Connect, allow any XML mimetype as a supported mimetype. Was previously limited to + {application|text}/xml. This enables for e.g. fetching SVGs with a image/svg+xml mimetype, without having to + disable mimetype validation. + * Bugfix: when outputting with XML syntax, HTML elements that were parsed as data nodes (