Azure / Azure/azure-storage-cpplite
curl postfields to request body are not passing thru
- Dominant language
- C++
- Stars
- 26
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
The lib_curl_http.h file in the include dir needs an extra setting to allow POSTFields to be passed to the body of the request.
SPN token only works if we post the client_credential params to the body of the message not as params.
In http://github.com/azure/azure-storage-fuse We added this line to get the above working.
check_code(curl_easy_setopt(m_curl, CURLOPT_POSTFIELDS, nullptr)); // CURL won't actually read data on POSTs unless this is explicitly set.
See our working method below.
void set_input_stream(storage_istream s) override {
m_input_stream = s;
check_code(curl_easy_setopt(m_curl, CURLOPT_READFUNCTION, read));
check_code(curl_easy_setopt(m_curl, CURLOPT_READDATA, this));
check_code(curl_easy_setopt(m_curl, CURLOPT_POSTFIELDS, nullptr)); // CURL won't actually read data on POSTs unless this is explicitly set.
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.