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

[tor-commits] [flashproxy/master] Nicer URL building.



commit ef486a7425771471c965eeb2db6f295074b7e7ea
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Mar 13 01:43:32 2013 -0700

    Nicer URL building.
---
 flashproxy-reg-url |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/flashproxy-reg-url b/flashproxy-reg-url
index 1070889..dc953c1 100755
--- a/flashproxy-reg-url
+++ b/flashproxy-reg-url
@@ -5,6 +5,7 @@ import socket
 import sys
 import re
 import getopt
+import urlparse
 
 from M2Crypto import RSA, BIO
 
@@ -112,4 +113,4 @@ rsa = RSA.load_pub_key_bio(BIO.MemoryBuffer(FACILITATOR_PUBKEY_PEM))
 reg_crypt = rsa.public_encrypt(reg_plain, RSA.pkcs1_oaep_padding)
 reg = base64.urlsafe_b64encode(reg_crypt)
 
-print "/".join([options.facilitator_url.strip("/"), "reg", reg])
+print urlparse.urljoin(options.facilitator_url, "reg/" + reg)



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