Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed writing received data to disk/application" error on windows #34

Open
hythm7 opened this issue Jul 7, 2023 · 1 comment
Open

Comments

@hythm7
Copy link

hythm7 commented Jul 7, 2023

Testing the module on windows by running this simple script:

use LibCurl::Easy;

print LibCurl::Easy.new(URL => 'http://google.com').perform.content;

produces the below error:

Failed writing received data to disk/application
  in method throw at 'SETTING::'src/core.c/Exception.pm6 line 65
  in sub die at 'SETTING::'src/core.c/control.pm6 line 255
  in method perform at
C:\Users\grunt-win\libcurl-test\..\raku-libcurl\lib\LibCurl\Easy.rakumod
(LibCurl::Easy) line 673
  in block <unit> at .\t\libcurl.rakutest line 8

curl.dll file installed on my windows system by downloading from libcurl website, then copying it to C:\Windows\System32\curl.dll

@hythm7
Copy link
Author

hythm7 commented Jul 8, 2023

Looks like libcurl throws this error CURLE_WRITE_ERROR when the return value of &writefunction callback is not correct.

I added debug code in writefunction and run a test comparing a successful request on Linux machine with a failed request on Windows machine

On Linux the response size returned from the server was 17194, and writefunction was called three times, first returned 2640, second returned 11264 and third returned 3290, correctly adding up to 17194.

On Windows writefunction was called only one time returning 1416, (which was supposed to run multiple times until write all 17194 size)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant