File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
libs/openFrameworks/utils Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -399,20 +399,12 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request)
399399 ofFile saveTo (request.name , ofFile::WriteOnly, true );
400400 curl_easy_setopt (curl.get (), CURLOPT_WRITEDATA, &saveTo);
401401 curl_easy_setopt (curl.get (), CURLOPT_WRITEFUNCTION, saveToFile_cb);
402+ err = curl_easy_perform (curl.get ());
402403 } else {
403404 curl_easy_setopt (curl.get (), CURLOPT_WRITEDATA, &response);
404405 curl_easy_setopt (curl.get (), CURLOPT_WRITEFUNCTION, saveToMemory_cb);
405- }
406- try {
407406 err = curl_easy_perform (curl.get ());
408- } catch (const std::exception & e) {
409- ofLogError (" ofURLFileLoader" ) << " Exception: " << e.what ();
410- return ofHttpResponse (request, -1 , e.what ());
411- } catch (...) {
412- ofLogError (" ofURLFileLoader" ) << " Unknown exception caught!" ;
413- return ofHttpResponse (request, -1 , " Unknown exception" );
414407 }
415-
416408 if (err == CURLE_OK) {
417409 long http_code = 0 ;
418410 curl_easy_getinfo (curl.get (), CURLINFO_RESPONSE_CODE, &http_code);
You can’t perform that action at this time.
0 commit comments