[Pkg-javascript-commits] [sockjs-client] 262/434: Don't test Unicode surrogates - it can't work against python sockjs server.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 9b3321c7a0a1af46949c91030288f8b86f9bd548
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Mon Dec 19 12:08:38 2011 +0000

    Don't test Unicode surrogates - it can't work against python sockjs server.
    
    Although sending surrogates is kindof acceptable against SockJS-node, it's impossible to get it working against sockjs servers that properly support unicode - like python. Therefore we shoulnd't really test/support unicode surrogates.
---
 README.md                   | 9 +++++----
 tests/html/src/tests.coffee | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index ed1b5c7..4e4d33b 100644
--- a/README.md
+++ b/README.md
@@ -289,10 +289,11 @@ There are various browser quirks which we don't intend to address:
    connection to one domain at the same time.
  * You shouldn't start SockJS connection before `body` loads - don't
    create SockJS objects within `head` (see #15).
- * Although SockJS is able deal with any Unicode characters (even
-   [invalid ones](http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates),
+ * Although SockJS is trying to escape any strange Unicode characters
+   (even
+   [invalid ones, like surrogates](http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates),
    it's advisable to use only valid characters. Using invalid
-   characters is a bit slower, as SockJS must escape them before
-   sending over the wire.
+   characters is a bit slower, and may not work with SockJS servers
+   that have a proper Unicode support.
  * Having a global function called `onmessage` or such is probably a
    bad idea.
diff --git a/tests/html/src/tests.coffee b/tests/html/src/tests.coffee
index f7cd6b1..de8464d 100644
--- a/tests/html/src/tests.coffee
+++ b/tests/html/src/tests.coffee
@@ -209,7 +209,7 @@ factor_batch_large_amp = (protocol) ->
 
 
 
-escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u2000-\u20ff\ufeff\ufff0-\uffff\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0 [...]
+escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u2000-\u20ff\ufeff\ufff0-\uffff\x00-\x1f\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0 [...]
 
 generate_killer_string = (escapable) ->
     s = []

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list