Bug 36468 - Remaining content-type = text/plain when JSON or HTML is returned
Summary: Remaining content-type = text/plain when JSON or HTML is returned
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-31 22:14 UTC by Victor Grousset/tuxayo
Modified: 2024-03-31 22:15 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)