Skip to content

Commit

Permalink
fix: Fix failure fetching encryption keys
Browse files Browse the repository at this point in the history
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 shaka-project/shaka-streamer#87 and
has not appeared in any release versions.

Change-Id: I9eca73d187a8a30f16c4a920fcdb7b4872253858
  • Loading branch information
joeyparrish committed Sep 7, 2021
1 parent c87c5bc commit 7392d80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packager/file/http_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ void HttpFile::SetupRequest() {
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &CurlWriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA,
method_ == HttpMethod::kGet ? &download_cache_ : nullptr);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &download_cache_);
if (method_ != HttpMethod::kGet) {
curl_easy_setopt(curl, CURLOPT_READFUNCTION, &CurlReadCallback);
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_cache_);
Expand Down

0 comments on commit 7392d80

Please sign in to comment.