diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-14 18:17:53 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-14 18:38:56 -0800 |
commit | f62d41ae05adade69fb08cff3c071b960c25c857 (patch) | |
tree | 805afedbea3aec92d46c5278ab99fe925655d6c4 /platform | |
parent | e44db93f1cb3276dcdc7de8400ca96beda1b1d30 (diff) | |
download | qtlocation-mapboxgl-f62d41ae05adade69fb08cff3c071b960c25c857.tar.gz |
[core] Restore existing response body
Until #2721 lands we still need this.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/src/http_request_android.cpp | 2 | ||||
-rw-r--r-- | platform/darwin/http_request_nsurl.mm | 2 | ||||
-rw-r--r-- | platform/default/http_request_curl.cpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/platform/android/src/http_request_android.cpp b/platform/android/src/http_request_android.cpp index 3458040083..9a554f5281 100644 --- a/platform/android/src/http_request_android.cpp +++ b/platform/android/src/http_request_android.cpp @@ -209,6 +209,8 @@ void HTTPAndroidRequest::onResponse(int code, std::string message, std::string e response->notModified = true; if (existingResponse) { + response->data = existingResponse->data; + if (response->expires == Seconds::zero()) { response->expires = existingResponse->expires; } diff --git a/platform/darwin/http_request_nsurl.mm b/platform/darwin/http_request_nsurl.mm index a43210cbc0..306cf96293 100644 --- a/platform/darwin/http_request_nsurl.mm +++ b/platform/darwin/http_request_nsurl.mm @@ -229,6 +229,8 @@ void HTTPNSURLRequest::handleResult(NSData *data, NSURLResponse *res, NSError *e response->notModified = true; if (existingResponse) { + response->data = existingResponse->data; + if (response->expires == Seconds::zero()) { response->expires = existingResponse->expires; } diff --git a/platform/default/http_request_curl.cpp b/platform/default/http_request_curl.cpp index 7f95d187cb..5ef8cddb74 100644 --- a/platform/default/http_request_curl.cpp +++ b/platform/default/http_request_curl.cpp @@ -532,6 +532,8 @@ void HTTPCURLRequest::handleResult(CURLcode code) { response->notModified = true; if (existingResponse) { + response->data = existingResponse->data; + if (response->expires == Seconds::zero()) { response->expires = existingResponse->expires; } |