We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24c6fa1 commit ff134a5Copy full SHA for ff134a5
lib/sockjs/session.rb
@@ -243,6 +243,10 @@ def wait(response, interval = 0.1)
243
end
244
245
246
+ def max_permitted_content_length
247
+ $DEBUG ? 4096 : 128_000
248
+ end
249
+
250
def run_user_app(response)
251
puts "~ Executing user's SockJS app"
252
frame = self.process_buffer(false)
@@ -257,6 +261,11 @@ def init_periodic_timer(response, interval)
257
261
258
262
unless @received_messages.empty?
259
263
run_user_app(response)
264
265
+ if @total_received_content_length <= max_permitted_content_length
266
+ # Close the response without writing any closing frame.
267
+ self.finish
268
260
269
270
271
0 commit comments