Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 929c33ffe5c0aa056a710ed03f7771afb379a55b 1 parent 0fa86cf
James Coglan jcoglan authored
2  build/faye.js
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) {
2  examples/node/app.js
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';
2  examples/rack/config.ru
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
2  javascript/server.js
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) {
2  lib/faye/server.rb
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?
Please sign in to comment.
Something went wrong with that request. Please try again.