[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Enable binary WebSocket frames for Safari 6.



commit 928ee5e773d56749f4c789cef469de4e2e6641a3
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Thu Sep 20 16:25:02 2012 -0700

    Enable binary WebSocket frames for Safari 6.
---
 flashproxy.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index 97910a6..e9fbb37 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -319,10 +319,17 @@ function have_websocket_binary_frames() {
     if (ua === null)
         return false;
 
+    /* We are cool for Chrome 16 or Safari 6.0. */
+
     matches = ua.match(/\bchrome\/(\d+)/i);
     if (matches !== null && Number(matches[1]) >= 16)
         return true;
 
+    matches = ua.match(/\bversion\/(\d+)/i);
+    if (ua.match(/\bsafari\b/i) && !ua.match(/\bchrome\b/i)
+        && Number(matches[1]) >= 6)
+        return true;
+
     return false;
 }
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits