From efacf1f39062e1a7d916cf35a40d9475ceb77c97 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 21 Apr 2026 22:38:56 +0800 Subject: [PATCH] Fix typo in getContentType function in cgi.nim (#25757) This pull request fixes a typo in the `getContentType` function in `lib/pure/cgi.nim`, ensuring it retrieves the correct `CONTENT_TYPE` environment variable. > Exact spelling matters: It is CONTENT_TYPE, not CONTENT_Type or Content-Type. Environment variables in CGI are case-sensitive. --- lib/pure/cgi.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/cgi.nim b/lib/pure/cgi.nim index 3d5d4d932e..8783b3389b 100644 --- a/lib/pure/cgi.nim +++ b/lib/pure/cgi.nim @@ -128,7 +128,7 @@ proc getContentLength*(): string = proc getContentType*(): string = ## Returns contents of the `CONTENT_TYPE` environment variable. - return getEnv("CONTENT_Type") + return getEnv("CONTENT_TYPE") proc getDocumentRoot*(): string = ## Returns contents of the `DOCUMENT_ROOT` environment variable.