https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24237 --- Comment #6 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 207289 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207289&action=edit Bug 24237: Make record returning endpoints have a fallback format Right now, the following endpoints return a 406 with a list of valid formats whenever an `Accept` header doesn't match the accepted formats, or if it is absent: * GET /authorities * GET /authorities/:authority_id * GET /biblios * GET /biblios/:biblio_id * GET /deleted/biblios * GET /deleted/biblios/:deleted_biblio_id It's been asked to fallback to `application/json` when the `Accept` header is not present, to have a sane default instead of an error. This patch implements that. The 406 is kept for invalid `Accept` headers. To test: 1. Launch a KTD instance: $ ktd --proxy --name bug_24237 up -d 2. Apply the regression tests patch 3. Run the tests: $ ktd --name bug_24237 --shell k$ prove t/db_dependent/api/v1/authorities.t \ t/db_dependent/api/v1/biblios.t \ t/db_dependent/api/v1/deleted_biblios.t => FAIL: New behavior tested, they don't pass. 406 returned instead of falling back to a known format. 4. Apply this patch 5. Repeat 3 => SUCCESS: Tests pass! 6. Test using postman and various `Accept` headers => SUCCESS: Works as expected! 7. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.