summary refs log tree commit diff stats
path: root/lib/pure/cgi.nim
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2015-10-13 15:25:40 -0700
committerAman Gupta <aman@tmm1.net>2015-10-13 15:25:40 -0700
commite2dbf222e60e00eb3f321151f4f206ed9c606a6c (patch)
treec513c0051fcb789add33cd3daaaab42344ee1da4 /lib/pure/cgi.nim
parentc3415a27d77f302be4f41d5f9bbcdf7c0dd3e80a (diff)
parent7f4f37eaa20ea8aa5cf8c34e497aaa8245c590b3 (diff)
downloadNim-e2dbf222e60e00eb3f321151f4f206ed9c606a6c.tar.gz
Merge remote-tracking branch 'origin/devel' into appveyor
Diffstat (limited to 'lib/pure/cgi.nim')
-rw-r--r--lib/pure/cgi.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/cgi.nim b/lib/pure/cgi.nim
index cfd768f91..200a4adf1 100644
--- a/lib/pure/cgi.nim
+++ b/lib/pure/cgi.nim
@@ -387,7 +387,7 @@ var
 proc getCookie*(name: string): TaintedString =
   ## Gets a cookie. If no cookie of `name` exists, "" is returned.
   if gcookies == nil: gcookies = parseCookies(getHttpCookie())
-  result = TaintedString(gcookies[name])
+  result = TaintedString(gcookies.getOrDefault(name))
 
 proc existsCookie*(name: string): bool =
   ## Checks if a cookie of `name` exists.