From 1d4758dadf13fe2f24fa21dcc95f91b62a98aa74 Mon Sep 17 00:00:00 2001
From: Fabian Lange <lange.fabian@gmail.com>
Date: Tue, 30 Dec 2014 12:31:40 +0100
Subject: [PATCH] Disable Range Support for Chrome 39+40 (#5512)

Disabling Range Support for Chrome 39 and 40, due to regression in
Chromium. https://crbug.com/442318
---
 web/compatibility.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/web/compatibility.js b/web/compatibility.js
index 967e312a9..fa42ecc35 100644
--- a/web/compatibility.js
+++ b/web/compatibility.js
@@ -479,7 +479,10 @@ if (typeof PDFJS === 'undefined') {
   var regex = /Android\s[0-2][^\d]/;
   var isOldAndroid = regex.test(navigator.userAgent);
 
-  if (isSafari || isOldAndroid) {
+  // Range requests are broken in Chrome 39 and 40, https://crbug.com/442318
+  var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent);
+
+  if (isSafari || isOldAndroid || isChromeWithRangeBug) {
     PDFJS.disableRange = true;
     PDFJS.disableStream = true;
   }