SignedEchange: Fallback if additional content-encodings are applied
Before this patch, Content-Encoding header of inner response was not checked (content was assumed to be "mi-sha256-03" encoded). Currently we only support "mi-sha256-03" inner encoding, so this patch makes SignedExchangeHandler reject (causing fallback redirect) the signed exchange if its inner Content-Encoding is not just "mi-sha256-03". This also refactors the logic to check integrity scheme, by moving them into single place, SignedExchangeHandler::CreateResponseBodyStream(). Note: This shouldn't affect amppackager, because it strips additional content-encodings in b3. https://github.com/ampproject/amppackager/issues/243 Bug: 931055, 934629 Change-Id: Icc0bde36194d4a387ab30968cccf1bef4c81fe60 Reviewed-on: https://chromium-review.googlesource.com/c/1482351Reviewed-by:Tsuyoshi Horo <horo@chromium.org> Reviewed-by:
Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#635413}
Showing
File added
Please register or sign in to comment