[tor-commits] [flashproxy/master] Use build_url.

dcf at torproject.org dcf at torproject.org
Sat Sep 8 09:30:20 UTC 2012


commit 42fffebdcb1c33c9e5824fdff278f9966ebb05ce
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Sep 7 12:50:22 2012 -0700

    Use build_url.
---
 flashproxy.js |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index d5b1c99..7e5a28d 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -322,8 +322,7 @@ function make_websocket(addr) {
     var url;
     var ws;
 
-    url = "ws://" + encodeURIComponent(addr.host)
-            + ":" + encodeURIComponent(addr.port) + "/";
+    url = build_url("ws", addr.host, addr.port, "/");
 
     if (have_websocket_binary_frames())
         ws = new WebSocket(url);
@@ -425,8 +424,7 @@ function FlashProxy() {
             return;
         }
 
-        fac_url = "https://" + encodeURIComponent(this.fac_addr.host)
-            + ":" + encodeURIComponent(this.fac_addr.port) + "/";
+        fac_url = build_url("https", this.fac_addr.host, this.fac_addr.port, "/");
         xhr = new XMLHttpRequest();
         try {
             xhr.open("GET", fac_url);



More information about the tor-commits mailing list