Makes the event handler for onBeforeSendHeaders event blocking

closes #11