diff options
-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: |