Removed restrictions on adding headers after connection has started

#2142
Added tests for headers

#2142
Made changes as per code review feedback

#2142
Made changes as per code review feedback

#2142