Commit Graph

44 Commits (44d3ddf9287a61fa60501fb55911f314c13d882f)

Author SHA1 Message Date
Vitaliy Filippov 44d3ddf928 Implement upload/download speed limit (fix #60) 2016-05-15 23:05:49 +03:00
Vitaliy Filippov 0112330c1d Do not die and do not update local state of file on sync exceptions. Should fix #47 2016-01-05 20:14:35 +03:00
Vitaliy Filippov 887da88c14 Simplify http::Agent methods and use multipart upload
Should speed-up uploads by updating metadata and contents at the same time.
Also should fix most 412 errors because of the update atomicity.
2015-10-10 00:54:05 +03:00
Vitaliy Filippov 9402bff12e Implement normal reliable HTTP logging (in Agent)
Flushes on every call so may be slightly slow, but in return always provides full
information in case of a segfault or a failed assertion.
2015-09-30 15:01:50 +03:00
Vitaliy Filippov 1d47616518 Fix #17 (curl_slist memory leak) 2015-07-04 00:18:59 +03:00
Vitaliy Filippov 70ec926e2a Add response body and headers to diagnostic information on HTTP 400 and above
Also should fix #13 because stops AuthAgent from using the same response multiple times
2015-06-27 22:58:09 +03:00
Vitaliy Filippov 2d34d7708b Implement upload methods for REST API Syncer (basic file upload to root now works) 2015-05-17 20:10:03 +03:00
Visa Putkinen 84785ec473 Fix hang when upload receives HTTP 500
When an uploading PUT request got a HTTP 500 as reponse, grive hanged
forever inside libcurl. This was because the File parameter was not
rewound to 0 position on retry. The XmlResponse had to be cleared as
well.

Rewinding the File and clearing the XmlResponse were not enough to fix
the problem, because when retrying after 500, HTTP 410 Gone or 412
Precondition failed is often received, and CheckHttpResponse would throw
an exception that crashes grive. Therefore, I implemented a retry logic
to Resource::Upload that retries the whole upload transaction if 410 or
412 was received.
2013-11-27 00:15:24 +02:00
Nestal Wan 738435837b using DataStream instead of Receiveable 2013-04-29 23:47:32 +08:00
Nestal Wan d4a7fae273 refactored exception handling 2013-04-29 23:47:32 +08:00
Nestal Wan 755ee1c9ad new qt gui 2013-04-29 23:47:32 +08:00
Nestal Wan d831b8d59f support creating revisions with --new-rev (#87) 2012-07-27 00:45:53 +08:00
Nestal Wan 5a0c6ae56e don't throw in CurlAgent for all HTTP errors (#82) 2012-07-26 01:25:44 +08:00
Nestal Wan c6a1c47d40 added retry on HTTP 500 & 503 (#82) 2012-07-20 00:50:40 +08:00
Nestal Wan 28e8012ca5 added AuthAgent, a wrapper around http agent 2012-07-20 00:39:36 +08:00
Nestal Wan ce245576b5 use StdioFile for uploading (#88) 2012-07-17 01:58:16 +08:00
Nestal Wan 593c335a5e improved logging for HTTP responses 2012-07-16 23:23:08 +08:00
Nestal Wan 80f3fbf370 refactored the logs to debug sync problems 2012-07-12 00:36:58 +08:00
Nestal Wan 48391bb16f added more log for dry-run (#65) 2012-06-17 16:33:38 +08:00
Nestal Wan 72052edf37 removed signal handler 2012-06-12 01:24:27 +08:00
Nestal Wan 7be193c35b added unit test case 2012-06-10 23:11:32 +08:00
Nestal Wan 89e07bb257 removed OpenSSL in Download.cc 2012-06-10 15:36:37 +08:00
Nestal Wan 197abfdea6 removed debug verbose setting in curl 2012-06-03 18:34:03 +08:00
Nestal Wan 379dddc532 fully configurable log 2012-06-03 18:31:02 +08:00
Nestal Wan c17ba4e880 added the http::Header class. should add it long ago. 2012-06-03 16:42:51 +08:00
Matchman Green 167e2eaac5 fixed create subfolder & seg fault 2012-05-29 00:31:29 +08:00
Matchman Green e09bdc5a8a trying to add fdopen 2012-05-27 14:55:26 +08:00
Matchman Green 97884cf25c improved HTTP error handling to troubleshoot issue #31 2012-05-24 23:50:23 +08:00
Matchman Green c7c49b094a fixed upload 2012-05-21 00:10:29 +08:00
Andrea Scarpino 1784277c7f Fix build (maybe due to GCC 4.7?)
/builds/grive-git/src/grive/libgrive/src/http/Agent.cc: In function ‘void {anonymous}::CallbackInt(int)’:                                      
/builds/grive-git/src/grive/libgrive/src/http/Agent.cc:63:2: error: ‘cout’ is not a member of ‘std’
2012-05-16 14:50:07 +03:00
Matchman Green 30f9834968 saved the metadata of the files 2012-05-14 23:33:29 +08:00
Matchman Green 35c2ef9fc1 use boost exception macro to throw exception 2012-05-14 23:32:22 +08:00
Matchman Green 4408f51300 improved and simplified log API 2012-05-13 16:45:27 +08:00
Matchman Green 63553aae04 added log interface 2012-05-13 16:10:18 +08:00
Matchman Green 8ced12d5a1 used new exception classes 2012-05-13 15:27:58 +08:00
Matchman Green f80a5f0fb7 trying to read properties from entry XML 2012-05-12 10:49:22 +08:00
Matchman Green d3b841ccfd added debug logs. the XML nodes need to be improved 2012-05-10 01:20:38 +08:00
Matchman Green 55fb39cbc1 adding log to http agent 2012-05-10 00:30:01 +08:00
Matchman Green efaa5df229 renamed HTTP.(hh|cc) to Agent 2012-05-10 00:22:27 +08:00
Matchman Green 06158e6bf0 fixed state reuse in the receivables 2012-05-09 22:25:42 +08:00
Matchman Green 1098e7e335 added code to remove files 2012-05-06 22:27:52 +08:00
Matchman Green f987888cac character handling in XML 2012-05-06 11:50:37 +08:00
Matchman Green 5e615de7cd added class to parse XML in HTTP response 2012-05-06 02:37:54 +08:00
Matchman Green b42e7c6501 move http files to a separate directory 2012-05-06 02:21:39 +08:00