Merge branch '12024-zero-content-length'
[arvados.git] / services / arv-git-httpd / auth_handler.go
index 31865011b79908a50f8c2d676c0f3e30fb6ad3d6..7a2841f49afcf78f74b95e8e362ef0635bd89d87 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
@@ -20,8 +24,12 @@ type authHandler struct {
 }
 
 func (h *authHandler) setup() {
-       os.Setenv("ARVADOS_API_HOST", theConfig.Client.APIHost)
-       h.clientPool = arvadosclient.MakeClientPool()
+       ac, err := arvadosclient.New(&theConfig.Client)
+       if err != nil {
+               log.Fatal(err)
+       }
+       h.clientPool = &arvadosclient.ClientPool{Prototype: ac}
+       log.Printf("%+v", h.clientPool.Prototype)
 }
 
 func (h *authHandler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {