You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had trouble today while attempting to download a file from Bunny. The first request (directory list) would succeed, but the second one (file download) would fail with a very non-descriptive error code 3 and no error message whatsoever, without even attempting to connect to the server.
A Google search hinted that error 3 has something to do with malformed URL's, but it took me a while to figure out that the problem was caused by a whitespace character in the file name. This doesn't seem documented anywhere, but I found a StackOverflow thread about it.
So, I have two alternative propositions:
please fix whitespace handling. A simple str_replace() call on the URL does the trick.
consider using PSR-18 HTTP client instead of cURL directly. cURL itself is too low level, difficult to debug, doesn't support logging and may even be unavailable. PSR-18 would abstract away this ugly dependency.
The text was updated successfully, but these errors were encountered:
I had trouble today while attempting to download a file from Bunny. The first request (directory list) would succeed, but the second one (file download) would fail with a very non-descriptive error code 3 and no error message whatsoever, without even attempting to connect to the server.
A Google search hinted that error 3 has something to do with malformed URL's, but it took me a while to figure out that the problem was caused by a whitespace character in the file name. This doesn't seem documented anywhere, but I found a StackOverflow thread about it.
So, I have two alternative propositions:
str_replace()
call on the URL does the trick.The text was updated successfully, but these errors were encountered: