Check that p is not nil in format
This commit is contained in:
parent
38392d2d03
commit
a90c388f6b
1 changed files with 1 additions and 1 deletions
|
|
@ -355,7 +355,7 @@ proc `[]=`*(p: var MultipartData, name: string, file: tuple[name, contentType, c
|
||||||
p.add(name, file.content, file.name, file.contentType)
|
p.add(name, file.content, file.name, file.contentType)
|
||||||
|
|
||||||
proc format(p: MultipartData): tuple[header, body: string] =
|
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 ("", "")
|
return ("", "")
|
||||||
|
|
||||||
# Create boundary that is not in the data to be formatted
|
# Create boundary that is not in the data to be formatted
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue