[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Account for base64 encoding in frame size limit.
commit 2e89edcf5d2310e838e0a4057505c98b41cabb1d
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sat Feb 2 20:22:29 2013 -0800
Account for base64 encoding in frame size limit.
---
websocket-transport/websocket-server.go | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/websocket-transport/websocket-server.go b/websocket-transport/websocket-server.go
index c269951..3288e96 100644
--- a/websocket-transport/websocket-server.go
+++ b/websocket-transport/websocket-server.go
@@ -168,7 +168,8 @@ func startListener(addr *net.TCPAddr) (*net.TCPListener, error) {
go func() {
var config WebsocketConfig
config.Subprotocols = []string{"base64"}
- config.MaxMessageSize = 16 * 1024
+ // 16 kilobytes, possibly base64-encoded.
+ config.MaxMessageSize = 16 * 1024 * 4 / 3 + 1
http.Handle("/", config.Handler(websocketHandler))
err = http.Serve(ln, nil)
if err != nil {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits