even more strict isNil handling for strings/seqs in order to detect bugs
This commit is contained in:
parent
9047c3f582
commit
64517445ea
36 changed files with 193 additions and 245 deletions
|
|
@ -135,10 +135,9 @@ iterator decodeData*(allowedMethods: set[RequestMethod] =
|
|||
## Reads and decodes CGI data and yields the (name, value) pairs the
|
||||
## data consists of. If the client does not use a method listed in the
|
||||
## `allowedMethods` set, an `ECgi` exception is raised.
|
||||
var data = getEncodedData(allowedMethods)
|
||||
if not isNil(data):
|
||||
for key, value in decodeData(data):
|
||||
yield (key, value)
|
||||
let data = getEncodedData(allowedMethods)
|
||||
for key, value in decodeData(data):
|
||||
yield (key, value)
|
||||
|
||||
proc readData*(allowedMethods: set[RequestMethod] =
|
||||
{methodNone, methodPost, methodGet}): StringTableRef =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue