From da3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1 Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Fri, 3 Jun 2016 15:14:12 +0600 Subject: CLOUD: Add GoogleDriveStorage It has its own GoogleDriveTokenRefresher and knows how to do info(). This commit also contains JSON int -> long long int fix and CurlJsonRequest '\n' -> ' ' fix. --- backends/networking/curl/curljsonrequest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'backends/networking/curl') diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp index df982bc814..46d88657d2 100644 --- a/backends/networking/curl/curljsonrequest.cpp +++ b/backends/networking/curl/curljsonrequest.cpp @@ -44,9 +44,11 @@ char *CurlJsonRequest::getPreparedContents() { //replace all "bad" bytes with '.' character byte *result = _contentsStream.getData(); uint32 size = _contentsStream.size(); - for (uint32 i = 0; i < size; ++i) - if (result[i] < 0x20 || result[i] > 0x7f) + for (uint32 i = 0; i < size; ++i) { + if (result[i] == '\n') result[i] = ' '; //yeah, kinda stupid + else if (result[i] < 0x20 || result[i] > 0x7f) result[i] = '.'; + } //make it zero-terminated string result[size - 1] = '\0'; -- cgit v1.2.3