From: Jason Stephenson Date: Thu, 7 Aug 2014 11:42:24 +0000 (-0400) Subject: Fixup NCIP::ILS::make_header. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f7435693f144394bc02c170734446d6f3d7acec8;p=NCIPServer.git Fixup NCIP::ILS::make_header. Change it to take the whole NCIP request as its argument. Signed-off-by: Jason Stephenson --- diff --git a/lib/NCIP/ILS.pm b/lib/NCIP/ILS.pm index 34f8f91..581b009 100644 --- a/lib/NCIP/ILS.pm +++ b/lib/NCIP/ILS.pm @@ -50,6 +50,8 @@ sub requestitem { # Other methods, just because. +# Handle a LookupVersion Request. You probably want to just call this +# one from your subclasses rather than reimplement it. sub lookupversion { } @@ -62,10 +64,18 @@ sub lookupversion { # NCIP::Header. sub make_header { my $self = shift; - my $initheader = shfit; + my $request = shift; + my $initheader; my $header; + for my $key (keys %$request) { + if ($request->{$key}->{InitiationHeader}) { + $initheader = $request->{$key}->{InitiationHeader}; + last; + } + } + if ($initheader && $initheader->{FromAgencyId} && $initheader->{ToAgencyId}) { $header = NCIP::Header->new(