fix: Fix failure fetching encryption keys
In one of the low-latency changes, a change was made to HttpFile that caused responses to HTTP POST requests to go missing. This resulted in failures to fetch encryption keys. The breaking change was recommended by me in a PR review, and was not caught by any unit tests. New tests would be ideal, but I chose to fix the bug first, rather than leave the repo broken. This bug was brought to my attention in google/shaka-streamer#87 and has not appeared in any release versions. Change-Id: I9eca73d187a8a30f16c4a920fcdb7b4872253858
This commit is contained in:
parent
c87c5bcdef
commit
7392d8003e
|
@ -296,8 +296,7 @@ void HttpFile::SetupRequest() {
|
||||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
|
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
|
||||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &CurlWriteCallback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &CurlWriteCallback);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA,
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &download_cache_);
|
||||||
method_ == HttpMethod::kGet ? &download_cache_ : nullptr);
|
|
||||||
if (method_ != HttpMethod::kGet) {
|
if (method_ != HttpMethod::kGet) {
|
||||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, &CurlReadCallback);
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, &CurlReadCallback);
|
||||||
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_cache_);
|
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_cache_);
|
||||||
|
|
Loading…
Reference in New Issue