Skip to content

Commit

Permalink
Allow 206 status code on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers committed Nov 22, 2024
1 parent ae416c4 commit dd8a01f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void HTTPRequest::onResponse(jni::JNIEnv& env,
response.expires = util::parseTimestamp(jni::Make<std::string>(env, expires).c_str());
}

if (code == 200) {
if (code == 200 || code == 206) {
if (body) {
auto data = std::make_shared<std::string>(body.Length(env), char());
jni::GetArrayRegion(env, *body, 0, data->size(), reinterpret_cast<jbyte*>(&(*data)[0]));
Expand Down

0 comments on commit dd8a01f

Please sign in to comment.