Skip to content

Commit

Permalink
Call string on TaintedStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Mar 6, 2020
1 parent 4dc010e commit 5903d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pure/httpclient.nim
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ proc sendFile(socket: Socket | AsyncSocket,
var buffer: string
while true:
buffer =
when socket is AsyncSocket: await read(file, chunkSize)
else: readStr(file, chunkSize)
when socket is AsyncSocket: (await read(file, chunkSize)).string
else: readStr(file, chunkSize).string
if buffer.len == 0: break
await socket.send(buffer)
file.close()
Expand Down

0 comments on commit 5903d1b

Please sign in to comment.