Gateway setopt HTTPHEADER bug

This is a simple fix in order to avoid erasing http headers when multiple calls to `setopt` are made.