bobbingwide / oik-bwtrace

debug trace for WordPress
https://www.oik-plugins.com/oik-plugins/oik-bwtrace-debug-trace-for-wordpress/
GNU General Public License v2.0
6 stars 1 forks source link

Consider reorganizing trace file names to put generation before extension #86

Open bobbingwide opened 4 years ago

bobbingwide commented 4 years ago

The current method of constructing a trace file name is trace-files-directory/filename.ext.generation and for the Daily Summary Report its trace-files-directory/bwtrace.vt.ccyymmdd

These names appear to cause a problem with some server/browser configurations where the server returns the file to the browser with a content type of: application/x-troff-man This causes the browser to want to save the file rather than display it.

Would it not be better to use a file extension that's recognised as a text/plain mime type?

trace-files-directory/filename.generation.ext or trace-files-directory/bwtrace.ccyymmdd.vt

bobbingwide commented 4 years ago

It appears we can force the files to be displayed as text/plain by putting the following into an .htaccess file into the trace-files-directory ForceType text/plain