Refactored httpserver to respond with different status codes (404 for example)