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.
This commit is contained in:
ringabout
2026-04-21 22:38:56 +08:00
committed by GitHub
parent 60bb9c75cc
commit efacf1f390

View File

@@ -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.