http: fix app name formatting in template 58/41158/2
authorMatus Fabian <[email protected]>
Wed, 19 Jun 2024 08:38:03 +0000 (10:38 +0200)
committerFlorin Coras <[email protected]>
Wed, 19 Jun 2024 15:30:31 +0000 (15:30 +0000)
app name is vector without null termination

Type: fix

Change-Id: Iaa50770c84f23a71165d76a63c29b76e90006ac6
Signed-off-by: Matus Fabian <[email protected]>
src/plugins/http/http.c

index 72b4812..22aaaeb 100644 (file)
@@ -387,12 +387,12 @@ static const char *http_redirect_template = "HTTP/1.1 %s\r\n";
 static const char *http_response_template = "HTTP/1.1 %s\r\n"
                                            "Date: %U GMT\r\n"
                                            "Expires: %U GMT\r\n"
-                                           "Server: %s\r\n"
+                                           "Server: %v\r\n"
                                            "Content-Type: %s\r\n"
                                            "Content-Length: %lu\r\n\r\n";
 
 static const char *http_request_template = "GET %s HTTP/1.1\r\n"
-                                          "User-Agent: %s\r\n"
+                                          "User-Agent: %v\r\n"
                                           "Accept: */*\r\n\r\n";
 
 static u32