Remove allow_response_without_content Let's just assume that no content type means no body. BUG=25766813 Change-Id: I374f8769263e7772cc720826897b214e25f8f1d4 Reviewed-on: https://weave-review.googlesource.com/1827 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/src/device_registration_info.cc b/src/device_registration_info.cc index 6bd42bd..b29bd52 100644 --- a/src/device_registration_info.cc +++ b/src/device_registration_info.cc
@@ -714,8 +714,8 @@ return; } - if (data->allow_response_without_content && - response->GetContentType().empty()) { + if (response->GetContentType().empty()) { + // Assume no body if no content type. cloud_backoff_entry_->InformOfRequest(true); return data->callback.Run({}, nullptr); }
diff --git a/src/device_registration_info.h b/src/device_registration_info.h index 5ba56a1..c196e0c 100644 --- a/src/device_registration_info.h +++ b/src/device_registration_info.h
@@ -182,8 +182,6 @@ provider::HttpClient::Method method; std::string url; std::string body; - // Workaround for inconsistent APIs which returns no body. - bool allow_response_without_content = false; CloudRequestDoneCallback callback; }; void SendCloudRequest(const std::shared_ptr<const CloudRequestData>& data);