php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch 0001-Fix-81496-CLI-server-logs-wrong-request-method.txt for Built-in web server Bug #81496

Patch version 2021-10-03 09:28 UTC

Return to Bug #81496 | Download this patch
Patch Revisions:

Developer: lauri.kentta@gmail.com

From e9cddd9d3c90406e3cff89c1104c22b31f826c24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lauri=20Kentt=C3=A4?= <lauri.kentta@gmail.com>
Date: Sun, 3 Oct 2021 12:21:35 +0300
Subject: [PATCH] Fix #81496: CLI server logs wrong request method

---
 sapi/cli/php_cli_server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 230ad62ee0..02e0c52088 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -1152,7 +1152,7 @@ static void php_cli_server_log_response(php_cli_server_client *client, int statu
 #endif
 
 	/* basic */
-	spprintf(&basic_buf, 0, "%s [%d]: %s %s", client->addr_str, status, SG(request_info).request_method, client->request.request_uri);
+	spprintf(&basic_buf, 0, "%s [%d]: %s %s", client->addr_str, status, php_http_method_str(client->request.request_method), client->request.request_uri);
 	if (!basic_buf) {
 		return;
 	}
-- 
2.33.0

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri May 27 22:05:46 2022 UTC