diff options
author | bptato <nincsnevem662@gmail.com> | 2024-10-27 21:52:37 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-10-27 21:52:37 +0100 |
commit | 00544b6053a1bd348148f74e60a5a22195859617 (patch) | |
tree | e7fc4a9d531172a5cdf2fcbac62a75a530589570 /adapter | |
parent | f7e0e02b89709b8d6592b3d570d8916a07ae2b79 (diff) | |
download | chawan-00544b6053a1bd348148f74e60a5a22195859617.tar.gz |
gemini: fix unnecessary NUL chars being sent
Diffstat (limited to 'adapter')
-rw-r--r-- | adapter/protocol/gemini.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adapter/protocol/gemini.nim b/adapter/protocol/gemini.nim index d174ed04..6bd656e4 100644 --- a/adapter/protocol/gemini.nim +++ b/adapter/protocol/gemini.nim @@ -208,7 +208,7 @@ proc readResponse(os: PosixStream; ssl: ptr SSL; reqBuf: string) = if meta == "": meta = "text/gemini" os.sendDataLoop("Content-Type: " & meta & "\n\n") - os.sendDataLoop(buffer.toOpenArray(i + 2, buffer.high)) + os.sendDataLoop(buffer.toOpenArray(i + 2, n - 1)) while true: let n = SSL_read(ssl, addr buffer[0], cint(buffer.len)) if n == 0: |