mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-25 06:18:16 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user