Support for missing HTTP status codes

Adds support for missing HTTP status codes as a fix for issue #442.

The implementation is not that pretty as it still has a lot of redundancy (although less than in the original version) but it fixes the issue.