aliyun / aliyun-oss-cpp-sdk

Aliyun OSS SDK for C++
Other
188 stars 88 forks source link

上传文件成功,但是提示错误 #70

Closed XieShaosong closed 4 years ago

XieShaosong commented 4 years ago

"PutObject fail, code ClientError:200052, message Server returned nothing (no headers, no data), requestId:"

huiguangjun commented 4 years ago

std::shared_ptr CurlHttpClient::makeRequest(const std::shared_ptr &request) { OSS_LOG(LogLevel::LogDebug, TAG, "request(%p) enter makeRequest", request.get()); curl_slist *list = nullptr; auto& headers = request->Headers(); for (const auto &p : headers) { if (p.second.empty()) continue; std::string str = p.first; str.append(": ").append(p.second); list = curl_slist_append(list, str.c_str()); } // 你可以修改一下代码,增加下面这段代码 list = curl_slist_append(list, "Expect:");

huiguangjun commented 4 years ago

已经更新到 1.8.1 版本