Skip to content

Commit

Permalink
update uxhr to prevent setting timeout on sync requests
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed Jun 26, 2014
1 parent 45c31e0 commit 2a10b9c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"bower_components"
],
"dependencies" : {
"uxhr": "endel/uxhr#b74710a1d54ed44cf3ad94daeed1c21e424095df",
"uxhr": "endel/uxhr#a484e430e224375b786072da5abb94dfd3c68685",
"qunit": "~1.9.0",
"when": "~2.8.0",
"lodash": "~2.4.0",
Expand Down
2 changes: 1 addition & 1 deletion dist/amd/dl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* https://github.com/doubleleft/dl-api-javascript
*
* @copyright 2014 Doubleleft
* @build 6/24/2014
* @build 6/26/2014
*/
(function(define) { 'use strict';
define(function (require) {
Expand Down
15 changes: 9 additions & 6 deletions dist/dl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* https://github.com/doubleleft/dl-api-javascript
*
* @copyright 2014 Doubleleft
* @build 6/24/2014
* @build 6/26/2014
*/
(function(window) {
//
Expand Down Expand Up @@ -1028,9 +1028,12 @@ define(function (require) {
req.open(method, url, !sync);

// set timeout
if ('ontimeout' in req) {
req.timeout = timeout;
req.ontimeout = ontimeout;
// timeouts cannot be set for synchronous requests made from a document.
if (!sync) {
if ('ontimeout' in req) {
req.timeout = timeout;
req.ontimeout = ontimeout;
}
}

// set onprogress
Expand Down Expand Up @@ -7849,7 +7852,7 @@ define(function (require) {
}.call(this));

!function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;for(b=a.split(",")[0].indexOf("base64")>=0?atob(a.split(",")[1]):decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f),h=0;h<b.length;h+=1)g[h]=b.charCodeAt(h);return i=a.split(",")[0].split(":")[1].split(";")[0],c?new Blob([d?g:f],{type:i}):(j=new e,j.append(f),j.getBlob(i))};a.HTMLCanvasElement&&!b.toBlob&&(b.mozGetAsFile?b.toBlob=function(a,c,d){d&&b.toDataURL&&f?a(f(this.toDataURL(c,d))):a(this.mozGetAsFile("blob",c))}:b.toDataURL&&f&&(b.toBlob=function(a,b,c){a(f(this.toDataURL(b,c)))})),"function"==typeof define&&define.amd?define(function(){return f}):a.dataURLtoBlob=f}(this);
/** @license
/**
* eventsource.js
* Available under MIT License (MIT)
* https://github.com/Yaffle/EventSource/
Expand Down Expand Up @@ -8114,7 +8117,7 @@ define(function (require) {
} else if (field === "retry") {
initialRetry = getDuration(value, initialRetry);
retry = initialRetry;
} else if (field === "heartbeatTimeout") {
} else if (field === "heartbeatTimeout") {//!
heartbeatTimeout = getDuration(value, heartbeatTimeout);
if (timeout !== 0) {
clearTimeout(timeout);
Expand Down
2 changes: 1 addition & 1 deletion dist/dl.min.js

Large diffs are not rendered by default.

0 comments on commit 2a10b9c

Please sign in to comment.