Skip to content

Conversation

@noomorph
Copy link
Contributor

@noomorph noomorph commented Oct 1, 2025

Context

A bit exotic feature, but you never know when you need some obscure thing from 2000s. 😅

As a user of Allure reports, I have to attach XML files with embedded XSL stylesheets, and the least problematic MIME type for them is, surprisingly, application/xhtml+xml.

  1. Browsers correctly render them when given URLs where the header contains Content-Type: application/xhtml+xml. Unfortunately, text/html is less predictable and there are rendering problems with it.
  2. In Allure reports, *.xml files are rendered as a code by default, but we don't want this specifically for styled XML files - it is preferable if they render interactively, just like .html attachments. This MIME type serves as a clear intent that we are know what we are doing.
text/html (actual) application/xhtml+xml (expected)
actual expected

Checklist

@noomorph
Copy link
Contributor Author

Anything else to be done here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants