content-length and 404 handling