Skip to content

Commit 82bf64c

Browse files
committed
support configuration of Response.swallow_client_abort? (with e075f34 fixes #186)
1 parent 1cb3e73 commit 82bf64c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/jruby/rack/DefaultRackApplicationFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ void initRuntime(final Ruby runtime) {
375375
runtime.evalScriptlet("JRuby::Rack::Booter.on_boot { require 'jruby/rack/chunked' }");
376376
// `require 'jruby/rack/chunked'` that happens after Rack is loaded
377377
}
378+
String swallowAbort = rackContext.getConfig().getProperty("jruby.rack.response.swallow_client_abort");
379+
Boolean swallowAbortFlag = (Boolean) DefaultRackConfig.toStrictBoolean(swallowAbort, null);
380+
if ( swallowAbortFlag != null ) {
381+
runtime.evalScriptlet("JRuby::Rack::Response.swallow_client_abort = " + swallowAbortFlag + "");
382+
}
378383
}
379384

380385
/**

0 commit comments

Comments
 (0)