11308: Eliminate old_div().
[arvados.git] / services / arv-git-httpd / auth_handler.go
index bfdb3969d70030d14dd2232431636cb5762d400d..9f92cd1b7213f5a720a771ae349fac7dd6558b39 100644 (file)
@@ -20,13 +20,12 @@ type authHandler struct {
 }
 
 func (h *authHandler) setup() {
-       os.Setenv("ARVADOS_API_HOST", theConfig.Client.APIHost)
-       if theConfig.Client.Insecure {
-               os.Setenv("ARVADOS_API_HOST_INSECURE", "1")
-       } else {
-               os.Setenv("ARVADOS_API_HOST_INSECURE", "")
+       ac, err := arvadosclient.New(&theConfig.Client)
+       if err != nil {
+               log.Fatal(err)
        }
-       h.clientPool = arvadosclient.MakeClientPool()
+       h.clientPool = &arvadosclient.ClientPool{Prototype: ac}
+       log.Printf("%+v", h.clientPool.Prototype)
 }
 
 func (h *authHandler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {