]> git.koha-community.org Git - koha.git/commit
Bug 32923: Fix x-koha-embed from EHoldings/*/*
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 14 Feb 2023 14:07:46 +0000 (15:07 +0100)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 28 Feb 2023 18:45:38 +0000 (18:45 +0000)
commit2f27e2c34a8b5945308c552e3f9ec0bbcded1089
tree454e543ae769326d2af9f310e008a31543d6275f
parent89ae0065328c0d20098cd6074b15a9442760ed5c
Bug 32923: Fix x-koha-embed from EHoldings/*/*

We were validating twice the input and it broke the x-koha-embed header.
I don't really know what's happening, but here is how to recreate the
problem:
1. Edit Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm
2. Add the following lines in Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm, in the list method
    warn $c->req->headers->header('x-koha-embed');
3. curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/erm/eholdings/ebsco/packages --header "x-koha-embed: resources+count,vendor"

=> There is no vendor in the response
=> The warn displays "resources+count"

If you apply this patch you will notice that "vendor" is part of the
response and the warn displays "resources+count, vendor"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 855e09163a4f92192756d1f783ab07cb8c00a972)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm
Koha/REST/V1/ERM/EHoldings/Packages/Local.pm
Koha/REST/V1/ERM/EHoldings/Resources/EBSCO.pm
Koha/REST/V1/ERM/EHoldings/Resources/Local.pm
Koha/REST/V1/ERM/EHoldings/Titles/EBSCO.pm
Koha/REST/V1/ERM/EHoldings/Titles/Local.pm