Merge pull request #12994 from overleaf/jpa-pdf-caching-fallback

[web] bring back support for proxies without HTTP-Range request support

GitOrigin-RevId: f0a4863ee175c332c9dea7da28987f293a903e63
This commit is contained in:
Jakob Ackermann 2023-05-10 10:51:49 +01:00 committed by Copybot
parent caeceba28c
commit b6877cb4dd

View file

@ -80,7 +80,8 @@ export function generatePdfCachingTransportFactory(PDFJS) {
})
const isExpectedFailureOnNewCompileDomain = err =>
isSplitTestEnabled('force-new-compile-domain') &&
isURLOnUserContentDomain(OError.getFullInfo(err).url)
isURLOnUserContentDomain(OError.getFullInfo(err).url) &&
OError.getFullInfo(err).responseSize !== this.pdfFile.size
const isStaleOutputRequest = () =>
performance.now() - this.startTime > STALE_OUTPUT_REQUEST_THRESHOLD_MS