mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
Fix SIGSEGV in httpclient response body (#16766)
* initialize httpclient response bodyStream; prevent SIGSEGV when getBody is false * Update lib/pure/httpclient.nim * Update lib/pure/httpclient.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
@@ -148,6 +148,12 @@ proc syncTest() =
|
||||
|
||||
client.close()
|
||||
|
||||
# SIGSEGV on HEAD body read: issue #16743
|
||||
block:
|
||||
let client = newHttpClient()
|
||||
let resp = client.head("http://httpbin.org/head")
|
||||
doAssert(resp.body == "")
|
||||
|
||||
when false:
|
||||
# Disabled for now because it causes troubles with AppVeyor
|
||||
# Timeout test.
|
||||
|
||||
Reference in New Issue
Block a user