From 83212def27a030b9c145f8cc7494602a22040954 Mon Sep 17 00:00:00 2001 From: Gabriel Baraldi Date: Wed, 30 Aug 2023 15:03:30 -0300 Subject: [PATCH 1/5] Avoid potential race between read and upload_data --- src/Curl/Easy.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Curl/Easy.jl b/src/Curl/Easy.jl index cf63f50..4855010 100644 --- a/src/Curl/Easy.jl +++ b/src/Curl/Easy.jl @@ -369,9 +369,11 @@ end # feed data to read_callback function upload_data(easy::Easy, input::IO) while true - data = eof(input) ? nothing : readavailable(input) - easy.input === nothing && break - easy.input = data + if easy.input === nothing || isempty(easy.input) + data = eof(input) ? nothing : readavailable(input) + easy.input === nothing && break + easy.input = data + end curl_easy_pause(easy.handle, Curl.CURLPAUSE_CONT) wait(easy.ready) easy.input === nothing && break From 18aeae86f2ee2a1bcb2de6050e817eed13a5b5d0 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 6 Sep 2023 11:17:57 -0400 Subject: [PATCH 2/5] Update Easy.jl --- src/Curl/Easy.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Curl/Easy.jl b/src/Curl/Easy.jl index 4855010..866657a 100644 --- a/src/Curl/Easy.jl +++ b/src/Curl/Easy.jl @@ -369,15 +369,13 @@ end # feed data to read_callback function upload_data(easy::Easy, input::IO) while true - if easy.input === nothing || isempty(easy.input) - data = eof(input) ? nothing : readavailable(input) - easy.input === nothing && break - easy.input = data - end + data = eof(input) ? nothing : readavailable(input) + easy.input === nothing && break + reset(easy.input) + easy.input = data curl_easy_pause(easy.handle, Curl.CURLPAUSE_CONT) wait(easy.ready) easy.input === nothing && break - easy.ready = Threads.Event() end end From 314d93fa17f9b1a2368a59697a61ff15421f97b2 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 6 Sep 2023 11:22:32 -0400 Subject: [PATCH 3/5] Update Easy.jl --- src/Curl/Easy.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Curl/Easy.jl b/src/Curl/Easy.jl index 866657a..eaab8b2 100644 --- a/src/Curl/Easy.jl +++ b/src/Curl/Easy.jl @@ -371,7 +371,7 @@ function upload_data(easy::Easy, input::IO) while true data = eof(input) ? nothing : readavailable(input) easy.input === nothing && break - reset(easy.input) + reset(easy.ready) easy.input = data curl_easy_pause(easy.handle, Curl.CURLPAUSE_CONT) wait(easy.ready) From 3575f7ed5b395b46fe3a9ad3ea3ff8f9b699740f Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 16 Sep 2023 12:23:36 -0400 Subject: [PATCH 4/5] bump compat --- .github/workflows/ci.yml | 2 -- Project.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2360a13..7c673c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,11 +3,9 @@ on: pull_request: branches: - master - - release-1.4 push: branches: - master - - release-1.4 tags: '*' jobs: test: diff --git a/Project.toml b/Project.toml index d578dd5..bfaa166 100644 --- a/Project.toml +++ b/Project.toml @@ -13,7 +13,7 @@ NetworkOptions = "ca575930-c2e3-43a9-ace4-1e988b2c1908" ArgTools = "1.1" LibCURL = "0.6" NetworkOptions = "1.2" -julia = "1.3" +julia = "1.8" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" From 7531f74f0ec094ea84d0eb3cbc6e7da8e242a6a9 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 16 Sep 2023 12:46:01 -0400 Subject: [PATCH 5/5] fixup --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c673c3..ad2f7ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,11 @@ on: pull_request: branches: - master + - release-1.4 push: branches: - master + - release-1.4 tags: '*' jobs: test: @@ -15,7 +17,6 @@ jobs: fail-fast: false matrix: version: - - '1.3' - '1' # automatically expands to the latest stable 1.x release of Julia. - 'nightly' os: