Merge pull request #3129 from apache/delay_response_until_end

Add option to delay responses until the end