diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-29 12:44:40 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-29 12:45:10 +0100 |
commit | e51cfcd8ff2d05271e3a225419c9152098984ca7 (patch) | |
tree | ba1c017901c3b948d229aee0413b414ab6241c75 /adapter/protocol | |
parent | 444793a6ac7b1359a88a47b39c4c2e90c1fe5236 (diff) | |
download | chawan-e51cfcd8ff2d05271e3a225419c9152098984ca7.tar.gz |
http: suppress proxy connect headers
causes problems with header parsing
Diffstat (limited to 'adapter/protocol')
-rw-r--r-- | adapter/protocol/curl.nim | 1 | ||||
-rw-r--r-- | adapter/protocol/http.nim | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/adapter/protocol/curl.nim b/adapter/protocol/curl.nim index 810435d2..74d24e6a 100644 --- a/adapter/protocol/curl.nim +++ b/adapter/protocol/curl.nim @@ -106,6 +106,7 @@ type CURLOPT_HTTPGET = CURLOPTTYPE_LONG + 80 CURLOPT_FTP_FILEMETHOD = CURLOPTTYPE_VALUES + 138 CURLOPT_CONNECT_ONLY = CURLOPTTYPE_LONG + 141 + CURLOPT_SUPPRESS_CONNECT_HEADERS = CURLOPTTYPE_LONG + 265 # Objectpoint CURLOPT_WRITEDATA = CURLOPTTYPE_CBPOINT + 1 diff --git a/adapter/protocol/http.nim b/adapter/protocol/http.nim index 4e2d529d..426a9dab 100644 --- a/adapter/protocol/http.nim +++ b/adapter/protocol/http.nim @@ -105,6 +105,7 @@ proc main() = url.set(CURLUPART_QUERY, query, flags) curl.setopt(CURLOPT_CURLU, url) let op = HttpHandle(curl: curl) + curl.setopt(CURLOPT_SUPPRESS_CONNECT_HEADERS, 1) curl.setopt(CURLOPT_WRITEFUNCTION, curlWriteBody) curl.setopt(CURLOPT_HEADERDATA, op) curl.setopt(CURLOPT_HEADERFUNCTION, curlWriteHeader) |