The default for all reports is plain text in UTF-8.
NOTE: UTF-8 selected because although current reports limit themselves
to ASCII character ranges, some reports may contain text pulled from the
protocol transferred and UTF-8 display covers most unexpected cases.
if (writeHttpHeader) {
HttpReply *rep = new HttpReply;
- rep->setHeaders(Http::scOkay, NULL, "text/plain", -1, squid_curtime, squid_curtime);
+ rep->setHeaders(Http::scOkay, NULL, contentType(), -1, squid_curtime, squid_curtime);
// Allow cachemgr and other XHR scripts access to our version string
const ActionParams ¶ms = command().params;
if (params.httpOrigin.size() > 0) {
StoreEntry *createStoreEntry() const; ///< creates store entry from params
+ ///< Content-Type: header value for this report
+ virtual const char *contentType() const {return "text/plain;charset=utf-8";}
+
protected:
/// calculate and keep local action-specific information
virtual void collect() {}