Forum Discussion

GrahamH's avatar
GrahamH
New Contributor
8 years ago

Can I serve .xhtml files as MIME type application/xhtml via a mock service Docroot?

I'm using the Docroot property of a SoapUI mock service to serve a web page that is a test client for the service.

 

I have deliberately developed that web page as polyglot XHTML5 (XML), and I have saved it with a .xhtml file extension. I would prefer that web page to be served as MIME type application/xhtml. However, SoapUI serves the .xhtml file as a binary octet stream (MIME type application/octet-stream). As a workaround, I can rename the file with a .html extension, and SoapUI serves it as text/html.

 

I can see from the HTTP response header that SoapUI uses Jetty, but I've looked no further. Can I customize Jetty by adding, or editing an existing, Jetty configuration file to serve .xhtml files as application/xhtml? Or is this configuration bound up inside SoapUI; would it involve a code change to SoapUI? (Do I need to request a product enhancement?) I'm running SoapUI on Windows 10.

No RepliesBe the first to reply