This commit checks http.Request.Context().Err() to see if the context has been canceled before writing an error code. It uses the non-standard Nginx 499 error code for client disconnection.