From 4687b40fc291200b7081b13ca08d3a3a54ed8676 Mon Sep 17 00:00:00 2001 From: Quinten Date: Tue, 11 Nov 2025 17:33:01 +0100 Subject: [PATCH] fix for tester --- webserv/handler/CgiEnvironment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webserv/handler/CgiEnvironment.cpp b/webserv/handler/CgiEnvironment.cpp index a9ee862..84296cd 100644 --- a/webserv/handler/CgiEnvironment.cpp +++ b/webserv/handler/CgiEnvironment.cpp @@ -22,7 +22,7 @@ CgiEnvironment::CgiEnvironment(const URI &uri, const HttpRequest &request) env_["SCRIPT_FILENAME"] = uri.getFullPath(); // Full filesystem path to the script (required by PHP) env_["QUERY_STRING"] = uri.getQuery(); env_["REQUEST_URI"] = request.getTarget(); - env_["PATH_INFO"] = uri.getPathInfo(); + env_["PATH_INFO"] = request.getTarget(); // TODO This is only correct for the tester; // Only set CONTENT_TYPE and CONTENT_LENGTH if they have values auto contentType = request.getHeaders().getContentType();