diff options
author | def <dennis@felsin9.de> | 2015-01-05 01:40:47 +0100 |
---|---|---|
committer | def <dennis@felsin9.de> | 2015-01-05 01:40:47 +0100 |
commit | a90c388f6bad1e5bfcdcb71d1ce271206c12bf24 (patch) | |
tree | d7c050bcfb50d6bca918bc6f90a322234c60f577 /lib/pure/httpclient.nim | |
parent | 38392d2d037c32e3b5773af82f28a2950858f816 (diff) | |
download | Nim-a90c388f6bad1e5bfcdcb71d1ce271206c12bf24.tar.gz |
Check that p is not nil in format
Diffstat (limited to 'lib/pure/httpclient.nim')
-rw-r--r-- | lib/pure/httpclient.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index b6ff62bdc..3ab56cddf 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -355,7 +355,7 @@ proc `[]=`*(p: var MultipartData, name: string, file: tuple[name, contentType, c p.add(name, file.content, file.name, file.contentType) proc format(p: MultipartData): tuple[header, body: string] = - if p.content == nil or p.content.len == 0: + if p == nil or p.content == nil or p.content.len == 0: return ("", "") # Create boundary that is not in the data to be formatted |