Fix issue with message-id header handling.

Updated test case to test for this problem.
Improve error handling for express http server.