serveHttp: More defensive request parsing and error messages