Skip to content

Commit

Permalink
[patch] Apply the patch from https://github.com/LearnBoost/engine.io-…
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Mar 28, 2014
1 parent bf3f45f commit 2884071
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
11 changes: 9 additions & 2 deletions transformers/engine.io/library.js
Expand Up @@ -707,6 +707,13 @@ function Transport (opts) {

Emitter(Transport.prototype);

/**
* A counter used to prevent collisions in the timestamps used
* for cache busting.
*/

Transport.timestamps = 0;

/**
* Emits an error.
*
Expand Down Expand Up @@ -1898,7 +1905,7 @@ Polling.prototype.uri = function(){
|| util.ua.ios6
|| this.timestampRequests) {
if (false !== this.timestampRequests) {
query[this.timestampParam] = +new Date;
query[this.timestampParam] = +new Date + '-' + Transport.timestamps++;
}
}

Expand Down Expand Up @@ -3527,4 +3534,4 @@ function ws(uri, protocols, opts) {

if (WebSocket) ws.prototype = WebSocket.prototype;

},{}]},{},[1])
},{}]},{},[1])
34 changes: 34 additions & 0 deletions transformers/engine.io/patches/IE8pollingcachebuster.patch
@@ -0,0 +1,34 @@
diff --git a/transformers/engine.io/library.js b/transformers/engine.io/library.js
index 7886c11..151e3e1 100644
--- a/transformers/engine.io/library.js
+++ b/transformers/engine.io/library.js
@@ -708,6 +708,13 @@ function Transport (opts) {
Emitter(Transport.prototype);

/**
+ * A counter used to prevent collisions in the timestamps used
+ * for cache busting.
+ */
+
+Transport.timestamps = 0;
+
+/**
* Emits an error.
*
* @param {String} str
@@ -1898,7 +1905,7 @@ Polling.prototype.uri = function(){
|| util.ua.ios6
|| this.timestampRequests) {
if (false !== this.timestampRequests) {
- query[this.timestampParam] = +new Date;
+ query[this.timestampParam] = +new Date + '-' + Transport.timestamps++;
}
}

@@ -3527,4 +3534,4 @@ function ws(uri, protocols, opts) {

if (WebSocket) ws.prototype = WebSocket.prototype;

-},{}]},{},[1])
\ No newline at end of file
+},{}]},{},[1])
2 changes: 2 additions & 0 deletions transformers/engine.io/update.sh
Expand Up @@ -18,3 +18,5 @@ cd $TEMPDIR
git checkout $(git describe --tags --abbrev=0)
NODE_ENV=production npm install
$DESTDIR/globalify.sh $TEMPDIR
cd $DESTDIR
find patches -name *.patch -exec patch -i {} \;

0 comments on commit 2884071

Please sign in to comment.