Fix SEGFAULT when receiving malformed POST.

Check for empty body when Content-Length is greater than zero. This would result in crashes in applications using libPKI.