Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Bring back OkHTTP
Browse files Browse the repository at this point in the history
Fixes #2856
  • Loading branch information
Leith Bade committed Oct 29, 2015
1 parent dd56e83 commit 0ddb1ab
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions platform/android/http_request_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void HTTPAndroidRequest::onResponse(int code, std::string message, std::string e
if (!expires.empty()) {
response->expires = parse_date(expires.c_str());
}
response->data = body;
response->data = std::make_shared<std::string>(body);

if (code == 304) {
if (existingResponse) {
Expand All @@ -276,7 +276,7 @@ void HTTPAndroidRequest::onResponse(int code, std::string message, std::string e
} else if (code == 200) {
response->status = Response::Successful;
status = ResponseStatus::Successful;
} else if (responseCode == 404) {
} else if (code == 404) {
response->status = Response::NotFound;
status = ResponseStatus::Successful;
} else if (code >= 500 && code < 600) {
Expand Down
4 changes: 0 additions & 4 deletions platform/android/mapboxgl-app.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
'<@(variant_cflags)',
],
'libraries': [
'<@(openssl_static_libs)',
'<@(libcurl_static_libs)',
'<@(libpng_static_libs)',
'<@(jpeg_static_libs)',
'<@(sqlite_static_libs)',
Expand All @@ -46,8 +44,6 @@
'<@(libpng_ldflags)',
'<@(jpeg_ldflags)',
'<@(sqlite_ldflags)',
'<@(openssl_ldflags)',
'<@(libcurl_ldflags)',
'<@(zlib_ldflags)',
'<@(libzip_ldflags)',
],
Expand Down
2 changes: 0 additions & 2 deletions scripts/android/configure.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash

BOOST_VERSION=1.59.0
LIBCURL_VERSION=7.45.0
OPENSSL_VERSION=1.0.1p
LIBPNG_VERSION=1.6.18
JPEG_VERSION=v9a
SQLITE_VERSION=3.9.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/android/defaults.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HEADLESS ?= none
PLATFORM ?= android
ASSET ?= zip
HTTP ?= curl
HTTP ?= android
CACHE ?= sqlite

GYP_FLAVOR_SUFFIX=-android
Expand Down

0 comments on commit 0ddb1ab

Please sign in to comment.