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 'config/initializers')
-rw-r--r--config/initializers/0_eager_load_http_cookie.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/initializers/0_eager_load_http_cookie.rb b/config/initializers/0_eager_load_http_cookie.rb
new file mode 100644
index 00000000000..ed633fdb079
--- /dev/null
+++ b/config/initializers/0_eager_load_http_cookie.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+# https://gitlab.com/gitlab-org/gitlab/issues/207937
+# http-cookie is not thread-safe while loading it the first time, see:
+# https://github.com/sparklemotion/http-cookie/issues/6#issuecomment-543570876
+# If we're using it, we should eagerly load it.
+# For now, we have an implicit dependency on it via:
+# * http
+# * rest-client
+require 'http/cookie_jar/hash_store' if Gem.loaded_specs.key?('http-cookie')