From 0413fb7f6ced499ae915ee0683d7890799234660 Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Wed, 11 May 2011 21:13:27 -0700 Subject: [PATCH] 0 is error for http, only MS would design this API --- test.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test.html b/test.html index e625f4bf1..767923ef8 100644 --- a/test.html +++ b/test.html @@ -29,12 +29,13 @@ function load() { req = new XMLHttpRequest(); req.open("GET", "uncompressed.tracemonkey-pldi-09.pdf"); + req.expected = 0; // 200 for HTTP req.onreadystatechange = xhrstate; req.send(null); } function xhrstate() { - if (req.readyState == 4 && (req.status == 200 || req.status == 0)) { + if (req.readyState == 4 && req.status == req.expected) { var data = req.mozResponseArrayBuffer; pdf = new PDFDoc(new Stream(data)); numPages = pdf.numPages;