Closed zvanjak closed 6 months ago
Looks like ReleaseSRWLockExclusive
might be from curl rather than cpr.
It appears curl added the call in 23af112f5556d6a785c17e09f2422ac931405f61, which was first included in curl 7.84.0.
cpr upgraded curl from 7.80.0 to 8.4.0 relatively recently. Downgrading to curl 7.83.0 or earlier might allow you to use cpr on Windows XP, though obviously you'd be missing out on bugfixes/features from 7.84.0 and later.
An alternative would be to replace the AcquireSRWLockExclusive
/ReleaseSRWLockExclusive
calls in curl with corresponding Windows XP calls if there are any. I have no idea how easy/hard that may be, though.
@ts826848 thanks for looking into this!
Yes, we updated curl to 8.4.0 to circumvent CVE-2023-38545. But if you are not using SOCKS5 poxy, you can downgrade curl to <= 7.83.0 and it should all work with WindowsXP.
Thank you both for quick response, it is greatly appreciated 🤗.
So, if I really must do it, course of action is: fork current cpr, downgrade curl that it uses to 7.83¸, build new static libraries and deploy instead of current ones.
No way it is going to be that easy 🤣, but it is a plan.
@zvanjak try using older cpr versions first that ship with older curl versions, as mentioned in my comment. This should fix your issues.
Closing as no further response. Feel free to reopen if the issue persists.
Description
I am using cpr (as a static library, through vcpkg, Visual Studio 2022 as IDE) in my app for a simple task of posting zip file to web server after doing some analysis, it is perfect for the job and works flawlessly, but because the above mentioned function is only part of Windows Vista onward, I can't use my app on Windows XP.
So, what are my options if I really, really must run it on Win XP?
I did some investigation and those SRW functions added on Vista are for performance improvements, so I figure it might be possible to use older functions instead of them, but before digging into cpr source, I figure it is best to see what others have to say (maybe I am on the wrong track, or there is a simple(r) solution).
Code where I am using cpr is really, really simple:
Example/How to Reproduce
Possible Fix
No response
Where did you get it from?
vcpkg
Additional Context/Your Environment