Partial requests to Cloudfront

0

When a partial GET request (with Range header specified) is sent to Cloudfront and caching is enabled, Cloudfront may internally increase Range header value (according to docs: "To optimize performance, CloudFront may request a larger range than the client requested in the Range GET")

In my case, Cloudfront returns as a viewer response body this larger part of a object instead of the smaller part that the client originally requested, e.g.:

  • viewer request with Range: bytes=0-511999
  • Cloudfront changes Range value to Range: bytes=0-1048575 and sends it to origin
  • Origin reponse includes Content-Length: 1048576
  • Viewer response also includes Content-Length: 1048576. I would like to get only the first 512000 bytes as a response.

Is this standard Cloudfront behavior or is there any option how to get only the client-requested part of the object in response?

質問済み 2年前209ビュー
2回答
0

It's odd. The behavior of CF to request a larger range does not mean it would return larger piece/chuck to the viewer. Can you share it with us, if the issue still persists? If yes, you should create a support case(with x-amz-cf-id information) and seek the help from AWS Premium Support team.

profile pictureAWS
Kenex_H
回答済み 10ヶ月前
0

This issue was resolved by modifying the API Gateway that was used as the Origin for this CloudFront endpoint. HTTP code 206 in the Integration response was not defined.

回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ