Save response body as binary when updating cache
Review Request #7098 — Created March 21, 2015 and submitted
In the HTTP cache for the API, the
response_body
field is marked as a
BLOB field and can contain arbitrary data. Previously when a cache entry
was updated, the content being inserted into theresponse_body
field
was not being marked as binary, which caused issues when dealing with
diffs that had non-ASCII characters. This patch fixes that issue by
ensuring the the response body is being saved as binary when the field
is updated.A unit test has been added to verify that non-ASCII data can be written
to the HTTP cache without error.
Ran unit tests.
Verified the supplied unit test fails without this patch applied.