2

We've run into an issue in Sitecore 9.3 where it's not serving media items properly via Azure FrontDoor with caching enabled. (Front Door works exceptionally well for 99.95% of the website).

But a 20MB PDF from the media library won't properly download, yet uploading it to the file system and loading it as a static PDF via Azure Front Door file will load correctly.

I have a feeling there's a glitch in the Sitecore media handler chunk capability (Sitecore.Resources.Media.MediaRequestHandler).

Azure Front Door "Delivery of Large files": https://docs.microsoft.com/en-us/azure/frontdoor/front-door-caching

Front door downloads large files in 8MB chunks. It appears Sitecore media handler won't properly serve media items to Azure Front Door when they are > 8MB.

Has anyone run into this issue and been able to resolve it?

I opened a Sitecore ticket, but they can't dig much further into it because Azure Front Door isn't listed in the official support matrix.

Thanks.

3

Azure Front Door and Azure CDN use the RFC-7233 implementation of Range header requests. (Source)

In Sitecore, the Media.EnableRangeRetrievalRequest setting is enabled by default. It is implemented based on RFC-2616, but as far as I can tell RFC-7233 has superseded it and it looks like Sitecore has not updated the Range header handling to support the changes in RFC-7233. This is true as of Sitecore 10.0.

You can fix the issue by setting Media.EnableRangeRetrievalRequest to false.

  • Thank you Mark! It appears this completely explains the issue and setting the value to false resolves the PDF download errors occurring on large > 8MB files from the Sitecore Media Library. – Cody Watkins Aug 31 '20 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.