From 9f2b3a322080c700bf6e5f6759a94c53ec9093fa 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 Signed-off-by: Jonathan Druart --- 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 684148379e5..ed7d401f2db 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 75eb2d39bd9..02e2d8fa4b9 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.34.1