Skip to content

Commit

Permalink
Item15154: fix explicitly provided content type
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 7, 2022
1 parent 289bfb3 commit be663c7
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions core/lib/Foswiki/UI/View.pm
Expand Up @@ -387,17 +387,19 @@ sub view {
$end = '';
}

if ( $session->getSkin() =~ m/\brss/ ) {
$contentType = 'text/xml';
}
elsif ( $session->getSkin() =~ m/\bxml/ ) {
$contentType = 'text/xml';
}
elsif ( $raw eq 'text' || $raw eq 'all' ) {
$contentType = 'text/plain';
}
else {
$contentType = 'text/html';
unless ($contentType) {
if ( $session->getSkin() =~ m/\brss/ ) {
$contentType = 'text/xml';
}
elsif ( $session->getSkin() =~ m/\bxml/ ) {
$contentType = 'text/xml';
}
elsif ( $raw eq 'text' || $raw eq 'all' ) {
$contentType = 'text/plain';
}
else {
$contentType = 'text/html';
}
}
$session->{prefs}->setSessionPreferences(
MAXREV => $maxRev,
Expand Down

0 comments on commit be663c7

Please sign in to comment.