Due to a bug in chrome (https://code.google.com/p/chromium/issues/detail?id=439832) I want to serve a file through netcat instead of loading it directly. But, when I try to simply do nc -l -p 8000 < /tmp/file.mhtml
and load http://localhost:8000
in Chrome, I get the text of the file instead of it being rendered as HTML. The file has a Content-Type header, So I expect it to be served:
From: <Saved by WebKit>
Subject: Foo Bar
Date: Fri, 22 Jan 2015 06:44:35 -0000
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0B03_4EE56298.243AD9A7"
------=_NextPart_000_0B03_4EE56298.243AD9A7
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
Content-Location: https://example.com/foo/bar?q=4