fix: race condition in sendHttp

Merged Sacha Brants requested to merge fix-race-condition-sendhttp into master

Replacing the deprecated getHttpHeaders with new copyHttpHeaders method to avoid race conditions.

Edited by Sacha Brants

Merge request reports