Removed restrictions on adding headers after connection has started

#2142
Added tests for headers

#2142