Added extra header info to use for processing xml and added support for different ini/configuration files based on hostname
added contact info and copyleft
Load config automatically based on matching request hostname
Add configuration file instructions
Add markdown extension to README
Merge pull request #8 from mark-cooper/load_config_hostname_match

Load config automatically based on matching request hostname
Expand patron identifier config options

Remove the patron_id_as_identifier yes/no configuration option and
replace it with "patron_identifier" which accepts the following:

* barcode - patron barcode (the default)
* id - patron database id

In the near future, we expect to have an additional option:

* ident - patron's ident value

This future third option will require additional work for retrieving
patrons via their ident value, etc.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Merge pull request #5 from tadl/patron_identifier_config_changes

Expand patron identifier config options
Add handling / mitigation for invalid XML

Wrap XML parsing attempts in an eval block to avoid having the CGI
generate an Internal Server Error.

Add support for removing raw Control-D characters, which we have
experienced in the wild when working with INN-REACH.

Generate warnings and attempt to gracefully fail with a log entry
and the "do not hang INN-REACH" message approach used in fail().

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Make invalid XML handling more robust, verbose

Differentiate between LibXML and non-LibXML errors when parsing
incoming NCIP messages.

Log the actual error encountered, and log what steps we take (if
any) to mitigate.

Also, remove an invalid use of == introduced in the previous commit.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add 'use XML::LibXML::ErrNo'

We are referencing a constant defined in XML::LibXML::ErrNo, so
let's ensure that we use that module.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Merge pull request #7 from tadl/handle_invalid_xml

Handle invalid xml

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Die if open() fails.
Merge pull request #6 from atz/master

Die if open() fails.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Also escape call number in responses

Also escape call number value in XML responses.

Still a strong desire to move away from heredocs for generating xml.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Don't use HTML entities in XML

Not all HTML entities are valid (built-in) XML entities. Don't try
to use HTML entities in XML.

Instead (until the TODO of "Move away from heredocs for generating
XML" is completed), use a naive sub to replace only ampersand,
greater than, and less than.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Merge pull request #9 from tadl/xml_escaping_fixes

xml escaping fixes

In addition to title and author, also attempt to escape call number
values in ItemRequestedResponse messages.

Also, don't use HTML::Entities::encode as that can introduce HTML
entities which are not valid built-in XML entities.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
XXX: TADL "use lib"

TADL "use lib" statement for production.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
XXX: TADL do not blindly set copy status

Do not blindly set copy status to Available on ItemRequestCancelled.

Signed-off-by: Jeff Godin <jgodin@tadl.org>