Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Config.rb uses websocket_max_message_size instead of ws_max_message_size #28

Closed
jeffjcrowe opened this issue Nov 13, 2012 · 3 comments
Closed

Comments

@jeffjcrowe
Copy link

There is an inconsistency for this config param.
security.rb (and default oversip.conf) refer to ws_max_message_size
config.rb refers to websocket_max_message_size

Causes the error:

oversip[3280]:  ERROR: <launcher (master)> comparison of Fixnum with nil failed (ArgumentError)#012...OverSIP/lib/oversip/websocket/ws_framing.rb:181:in `receive_data'#012...OverSIP/lib/oversip/websocket/listeners/ws_server.rb:144:in `process_received_data'#012...OverSIP/lib/oversip/websocket/listeners/ws_server.rb:110:in `receive_data'

Patch:

--- a/lib/oversip/config.rb
+++ b/lib/oversip/config.rb
@@ -66,7 +66,7 @@ module OverSIP
       },
       :security => {
         :sip_max_body_size                 => 65536,
-        :websocket_max_message_size        => 65536,
+        :ws_max_message_size               => 65536,
         :connection_in_inactivity_timeout  => 120,
         :connection_out_inactivity_timeout => 120,
         :anti_slow_attack_timeout    => 4
@@ -124,7 +124,7 @@ module OverSIP
       },
       :security => {
         :sip_max_body_size                 => :fixnum,
-        :websocket_max_message_size        => :fixnum,
+        :ws_max_message_size               => :fixnum,
         :connection_in_inactivity_timeout  => [ :fixnum, [ :greater_equal_than, 2 ] ],
         :connection_out_inactivity_timeout => [ :fixnum, [ :greater_equal_than, 2 ] ],
         :anti_slow_attack_timeout          => :fixnum
@ibc ibc closed this as completed in 41baff9 Nov 13, 2012
@ibc
Copy link
Member

ibc commented Nov 13, 2012

Thanks a lot @jeffjcrowe. However please don't use master branch in production, I have some pending changes and the new security.rb approach is still in an early stage (I will change related things to improve it).

I strongly recommend you using the last stable version 1.3.2.

Thanks a lot.

@jeffjcrowe
Copy link
Author

Thanks @ibc! I just did a fresh checkout for some local testing, was surprised by the error and figured I would report it. Totally agreed that I should probably be using 1.3.2, especially when I move to prod. Keep up the great work!

@ibc
Copy link
Member

ibc commented Nov 13, 2012

Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants