added content type to error page, replace address and port with request.host