From f1e44b4d6ed922e7ed0e4c699364acbebc4e4372 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 28 Mar 2024 15:13:59 +0000 Subject: [PATCH] Bug 36418: Catch more cases where header response should be application/json Signed-off-by: Victor Grousset/tuxayo --- svc/mana/increment | 2 +- svc/recall | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/svc/mana/increment b/svc/mana/increment index 684148379e..ed7d401f2d 100755 --- a/svc/mana/increment +++ b/svc/mana/increment @@ -29,7 +29,7 @@ use JSON; my $input = CGI->new; binmode STDOUT, ":encoding(UTF-8)"; -print $input->header( -type => 'text/plain', -charset => 'UTF-8' ); +print $input->header( -type => 'application/json', -charset => 'UTF-8' ); my ( $auth_status ) = check_cookie_auth( $input->cookie('CGISESSID'), diff --git a/svc/recall b/svc/recall index 75eb2d39bd..02e2d8fa4b 100755 --- a/svc/recall +++ b/svc/recall @@ -33,7 +33,7 @@ my $json = encode_json({ success => 0 }); my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { recall => 'manage_recalls' } ); if ( $auth_status ne "ok" ) { - print $input->header(-type => 'text/plain', -status => '403 Forbidden'); + print $input->header(-type => 'application/json', -status => '403 Forbidden'); exit 0; } -- 2.44.0