mirror of
https://github.com/openharmony/miscservices_request.git
synced 2026-07-20 22:58:08 -04:00
Signed-off-by: lovechinamo <wangdongqi2@huawei.com>
Changes to be committed:
This commit is contained in:
@@ -66,7 +66,7 @@ uint32_t DownloadServiceProxy::Request(const DownloadConfig &config)
|
||||
data.WriteUint32(config.GetHeader().size());
|
||||
|
||||
std::map<std::string, std::string>::const_iterator iter;
|
||||
for (iter = config.GetHeader().begin(); iter != config.GetHeader().end(); ++iter){
|
||||
for (iter = config.GetHeader().begin(); iter != config.GetHeader().end(); ++iter) {
|
||||
data.WriteString(iter->first);
|
||||
data.WriteString(iter->second);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ bool DownloadTaskNapi::ParseHeader(napi_env env, napi_value configValue, Downloa
|
||||
auto names = NapiUtils::GetPropertyNames(env, header);
|
||||
std::vector<std::string>::iterator iter;
|
||||
DOWNLOAD_HILOGD("current name list size = %{public}zu", names.size());
|
||||
for (iter = names.begin(); iter != names.end(); ++iter){
|
||||
for (iter = names.begin(); iter != names.end(); ++iter) {
|
||||
auto value = NapiUtils::GetStringPropertyUtf8(env, header, *iter);
|
||||
if (!value.empty()) {
|
||||
config.SetHeader(NapiUtils::ToLower(*iter), value);
|
||||
|
||||
Reference in New Issue
Block a user