Bug 36468

Summary: Remaining content-type = text/plain when JSON or HTML is returned
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Victor Grousset/tuxayo 2024-03-31 22:14:48 UTC
Found when reviewing Bug 36418

serials/subscription-frequency.pl

> print $input->header(-type => 'text/plain', -charset => 'UTF-8');
> print to_json( $frequencyrecord );

---

same in 
serials/subscription-numberpattern.pl

---

serials/create-numberpattern.pl manual json here:
> print $input->header(-type => 'text/plain', -charset => 'UTF-8');
> print "{\"numberpatternid\":\"$numberpatternid\"}";

---

Here it's HTML but still text/plain content-type
acqui/ajax-getauthvaluedropbox.pl


---

I searched with
rg "text/plain" -C 10 | rg "json" -C 10 # rg is the package ripgrep in most cases
(and somehow the html case came up in the noise due to the wacky grep chaining)

I tried doing the same with `git grep` + grep but I got even more noise that I already had.

Anyway, that's an hint to give ideas to eventually find more inconsistencies.
(apply Bug 36418 is it's still not merged)