Fixed a bug where I was using a deprecated PHP function to read the POST body.
Squashed bugs: incorrect boolean type checking, incorrect null/empty object checking and added some header return values.
Ignoring XML capture files used for testing.