Permalink
Browse files

A few hacks to enable testing using CometD stress testing tools.

  • Loading branch information...
1 parent 0fa86cf commit 929c33ffe5c0aa056a710ed03f7771afb379a55b @jcoglan jcoglan committed Apr 3, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 build/faye.js
  2. +1 −1 examples/node/app.js
  3. +1 −1 examples/rack/config.ru
  4. +1 −1 javascript/server.js
  5. +1 −1 lib/faye/server.rb
View
@@ -1025,7 +1025,7 @@ Faye.Server = Faye.Class({
if (!message.version)
response.error = Faye.Error.parameterMissing('version');
- var clientConns = message.supportedConnectionTypes,
+ var clientConns = message.supportedConnectionTypes || ['long-polling'],
commonConns;
if (!local) {
View
@@ -5,7 +5,7 @@ var fs = require('fs'),
faye = require('./faye');
var PUBLIC_DIR = path.dirname(__filename) + '/../shared/public',
- comet = new faye.NodeAdapter({mount: '/comet', timeout: 45}),
+ comet = new faye.NodeAdapter({mount: '/cometd', timeout: 5}),
port = process.ARGV[2] || '8000';
View
@@ -3,6 +3,6 @@ dir = File.dirname(__FILE__)
require dir + '/../../lib/faye'
require dir + '/app'
-use Faye::RackAdapter, :mount => '/comet', :timeout => 25
+use Faye::RackAdapter, :mount => '/cometd', :timeout => 5
run Sinatra::Application
View
@@ -112,7 +112,7 @@ Faye.Server = Faye.Class({
if (!message.version)
response.error = Faye.Error.parameterMissing('version');
- var clientConns = message.supportedConnectionTypes,
+ var clientConns = message.supportedConnectionTypes || ['long-polling'],
commonConns;
if (!local) {
View
@@ -104,7 +104,7 @@ def handshake(message, local = false)
unless local
response['supportedConnectionTypes'] = CONNECTION_TYPES
- client_conns = message['supportedConnectionTypes']
+ client_conns = message['supportedConnectionTypes'] || ['long-polling']
if client_conns
common_conns = client_conns.select { |c| CONNECTION_TYPES.include?(c) }
response['error'] = Error.conntype_mismatch(*client_conns) if common_conns.empty?

0 comments on commit 929c33f

Please sign in to comment.