Add missing status codes in webserver

Fixes #1624, based on #1631, but adds additional cases.