A nice solution might be to have a new set of URLs for echoing just the text/plain content.

These could be from a script, like "foo.com/plain-doc?procedure=map".
or they could be simple cached "pages", like "foo.com/plain-doc/map.txt"

I'm not sure how hard the scripting would be, but the point here is that you can serve text/plain from a web page instead, which is probably preferable.