Bugzilla – Attachment 164104 Details for
Bug 36418
Set response's content-type to application/json when needed - svc scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36418: Catch more cases where header response should be application/json
Bug-36418-Catch-more-cases-where-header-response-s.patch (text/plain), 1.42 KB, created by
Jonathan Druart
on 2024-03-29 07:28:36 UTC
(
hide
)
Description:
Bug 36418: Catch more cases where header response should be application/json
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-03-29 07:28:36 UTC
Size:
1.42 KB
patch
obsolete
>From 9f2b3a322080c700bf6e5f6759a94c53ec9093fa Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >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 <victor@tuxayo.net> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36418
:
163837
|
163885
|
163922
|
163923
|
164066
|
164094
|
164095
|
164096
|
164097
|
164102
|
164103
| 164104 |
164105