Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/api/channel_settings.go')
-rw-r--r--workhorse/internal/api/channel_settings.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/workhorse/internal/api/channel_settings.go b/workhorse/internal/api/channel_settings.go
index 91798334a03..ed03b04a69b 100644
--- a/workhorse/internal/api/channel_settings.go
+++ b/workhorse/internal/api/channel_settings.go
@@ -8,8 +8,6 @@ import (
"net/url"
"github.com/gorilla/websocket"
-
- "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper"
)
type ChannelSettings struct {
@@ -53,7 +51,10 @@ func (t *ChannelSettings) Dialer() *websocket.Dialer {
func (t *ChannelSettings) Clone() *ChannelSettings {
// Doesn't clone the strings, but that's OK as strings are immutable in go
cloned := *t
- cloned.Header = helper.HeaderClone(t.Header)
+ cloned.Header = t.Header.Clone()
+ if cloned.Header == nil {
+ cloned.Header = make(http.Header)
+ }
return &cloned
}