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>