[tor-commits] [flashproxy/master] rm websockify patch and init script.

dcf at torproject.org dcf at torproject.org
Wed Jan 30 05:11:38 UTC 2013


commit 9874c4b92efb217221db328a1ad7e45bba4bc15c
Author: David Fifield <david at bamsoftware.com>
Date:   Mon Nov 26 21:05:49 2012 -0800

    rm websockify patch and init script.
---
 init.d/websockify                       |   62 -------------------------------
 patches/websockify-binary-default.patch |   40 --------------------
 2 files changed, 0 insertions(+), 102 deletions(-)

diff --git a/init.d/websockify b/init.d/websockify
deleted file mode 100755
index 22a5450..0000000
--- a/init.d/websockify
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# websockify   This shell script takes care of starting and stopping
-#              the websockify server.
-#
-# chkconfig: 2345 90 10
-# description: websockify server.
-# processname: websockify
-# pidfile: /var/websockify/websockify.pid
-
-# Installation instructions:
-# cp init.d/websockify /etc/init.d/websockify
-# chkconfig --add websockify
-# service websockify start
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-BINDIR=/usr/local/bin
-VARDIR=/var/websockify
-WEBSOCKIFY=$BINDIR/websockify
-WEBSOCKIFY_PORT=9901
-LOCAL_ADDRESS=127.0.0.1:9001
-PIDFILE=$VARDIR/websockify.pid
-USER=websockify
-
-# See how we were called.
-case "$1" in
-  start)
-	[ -x $WEBSOCKIFY ] || exit 1
-	echo -n $"Starting websockify server: "
-	cd $VARDIR && daemon --user "$USER" --pidfile $PIDFILE "$WEBSOCKIFY" :"$WEBSOCKIFY_PORT" "$LOCAL_ADDRESS"
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/websockify
-	;;
-  stop)
-	# Stop daemon.
-	echo -n $"Shutting down websockify server: "
-	killproc websockify
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/websockify
-	;;
-  status)
-	status websockify
-	RETVAL=$?
-	;;
-  restart|reload)
-	$0 stop
-	$0 start
-	;;
-  condrestart)
-	[ -f /var/lock/subsys/websockify ] && restart || :
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|status|restart}"
-	RETVAL=3
-	;;
-esac
-
-exit $RETVAL
diff --git a/patches/websockify-binary-default.patch b/patches/websockify-binary-default.patch
deleted file mode 100644
index bb7a469..0000000
--- a/patches/websockify-binary-default.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From dc3a5f38d9921aa3cd128744ab3be5e6cfb7ff48 Mon Sep 17 00:00:00 2001
-From: David Fifield <david at bamsoftware.com>
-Date: Sun, 22 Jul 2012 20:52:47 -0700
-Subject: [PATCH] Assume binary transfer when no subprotocol is given.
-
----
- websocket.py |    8 ++------
- 1 file changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/websocket.py b/websocket.py
-index 96156b9..7a42ff6 100644
---- a/websocket.py
-+++ b/websocket.py
-@@ -585,12 +585,10 @@ Sec-WebSocket-Accept: %s\r
-             key = h['Sec-WebSocket-Key']
- 
-             # Choose binary if client supports it
--            if 'binary' in protocols:
--                self.base64 = False
--            elif 'base64' in protocols:
-+            if 'base64' in protocols:
-                 self.base64 = True
-             else:
--                raise self.EClose("Client must support 'binary' or 'base64' protocol")
-+                self.base64 = False
- 
-             # Generate the hash value for the accept header
-             accept = b64encode(sha1(s2b(key + self.GUID)).digest())
-@@ -598,8 +596,6 @@ Sec-WebSocket-Accept: %s\r
-             response = self.server_handshake_hybi % b2s(accept)
-             if self.base64:
-                 response += "Sec-WebSocket-Protocol: base64\r\n"
--            else:
--                response += "Sec-WebSocket-Protocol: binary\r\n"
-             response += "\r\n"
- 
-         else:
--- 
-1.7.10.4
-





More information about the tor-commits mailing list