summaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
authorPaul Seligman <pseligman@apple.com>2022-10-07 07:52:31 -0400
committerDaniel Stenberg <daniel@haxx.se>2022-10-09 23:09:58 +0200
commitb261389dbad6d96c193f6885b216e358905b3ecc (patch)
tree0907ad8d4cce4fb792c381794eaa90837125792a /lib/sendf.c
parentd905de276911ee5b0dae3feab9793dcb811cf30d (diff)
downloadcurl-b261389dbad6d96c193f6885b216e358905b3ecc.tar.gz
ws: minor fixes for web sockets without the CONNECT_ONLY flag
- Fixed an issue where is_in_callback was getting cleared when using web sockets with debug logging enabled - Ensure the handle is is_in_callback when calling out to fwrite_func - Change the write vs. send_data decision to whether or not the handle is in CONNECT_ONLY mode. - Account for buflen not including the header length in curl_ws_send Closes #9665
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index 66cec0597..d26b7e7cd 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -735,9 +735,10 @@ void Curl_debug(struct Curl_easy *data, curl_infotype type,
static const char s_infotype[CURLINFO_END][3] = {
"* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
if(data->set.fdebug) {
+ bool inCallback = Curl_is_in_callback(data);
Curl_set_in_callback(data, true);
(void)(*data->set.fdebug)(data, type, ptr, size, data->set.debugdata);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, inCallback);
}
else {
switch(type) {