From 2a466132a0b55d7e9ff6418e765b2e1f6cfcc82d Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 4 Oct 2019 08:46:54 +0200 Subject: [PATCH] vmm: api: Set the HTTP response header Server field To "Cloud Hypervisor API" and not "Firecracker API". Signed-off-by: Samuel Ortiz --- vmm/src/api/http.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmm/src/api/http.rs b/vmm/src/api/http.rs index cc8dc220d..1a7649068 100644 --- a/vmm/src/api/http.rs +++ b/vmm/src/api/http.rs @@ -82,7 +82,7 @@ fn http_serve( while let Some(request) = http_connection.pop_parsed_request() { let sender = api_sender.clone(); let path = request.uri().get_abs_path().to_string(); - let response = match HTTP_ROUTES.routes.get(&path) { + let mut response = match HTTP_ROUTES.routes.get(&path) { Some(route) => match api_notifier.try_clone() { Ok(notifier) => route.handle_request(&request, notifier, sender), Err(_) => Response::new(Version::Http11, StatusCode::InternalServerError), @@ -90,6 +90,7 @@ fn http_serve( None => Response::new(Version::Http11, StatusCode::NotFound), }; + response.set_server("Cloud Hypervisor API"); http_connection.enqueue_response(response); } }