From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
node examples: fixed apps to build and run
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/node-express-example/Makefile b/node-express-example/Makefile
--- a/node-express-example/Makefile
+++ b/node-express-example/Makefile
@@ -8,6 +8,7 @@ ROOTFS/express:
mkdir -p ROOTFS
git clone git://
github.com/strongloop/express.git --depth 1 ROOTFS/express
cd ROOTFS/express && npm install
+ rm -rf ROOTFS/express/test
test:
python test.py
clean:
diff --git a/node-socketio-example/Makefile b/node-socketio-example/Makefile
--- a/node-socketio-example/Makefile
+++ b/node-socketio-example/Makefile
@@ -7,7 +7,6 @@ ROOTFS/chat-example:
mkdir -p ROOTFS
git clone
https://github.com/guille/chat-example.git --depth 1
ROOTFS/chat-example
cd ROOTFS/chat-example && npm install
- patch -p0 < remove-isvalidutf8.patch
test:
python test.py
diff --git a/node-socketio-example/remove-isvalidutf8.patch
b/node-socketio-example/remove-isvalidutf8.patch
--- a/node-socketio-example/remove-isvalidutf8.patch
+++ b/node-socketio-example/remove-isvalidutf8.patch
@@ -1,24 +0,0 @@
----
ROOTFS/chat-example/node_modules/
socket.io/node_modules/engine.io/node_modules/ws/lib/Receiver.js.orig
2013-07-02 20:04:19.000000000 +0900
-+++
ROOTFS/chat-example/node_modules/
socket.io/node_modules/engine.io/node_modules/ws/lib/Receiver.js
2014-10-25 02:44:17.218251886 +0900
-@@ -390,10 +390,6 @@
- if (packet != null) this.currentMessage.push(packet);
- if (this.state.lastFragment) {
- var messageBuffer = this.concatBuffers(this.currentMessage);
-- if (!Validation.isValidUTF8(messageBuffer)) {
-- this.error('invalid utf8 sequence', 1007);
-- return;
-- }
- this.ontext(messageBuffer.toString('utf8'), {masked:
this.state.masked, buffer: messageBuffer});
- this.currentMessage = [];
- }
-@@ -500,10 +496,6 @@
- var message = '';
- if (data && data.length > 2) {
- var messageBuffer = data.slice(2);
-- if (!Validation.isValidUTF8(messageBuffer)) {
-- self.error('invalid utf8 sequence', 1007);
-- return;
-- }
- message = messageBuffer.toString('utf8');
- }
- this.onclose(code, message, {masked: self.state.masked});