-our (@fatal_errors, @errors, @debug, @msgs, @hints, @notes);
+my %mime_types = (
+ txt => 'text/plain',
+ 'txt.gz' => 'text/plain',
+ html => 'text/html',
+ rss => 'application/rss+xml',
+ rfc822 => 'text/plain',
+ );
+
+sub get_mime {
+ return $mime_types{$_[0]} || $_[1] || 'text/html';
+}
+
+our (@fatal_errors, @errors, @debug, @hints);
+our $http_code;