Merge branch '6859-fix-invalid-manifests' refs #6859
[arvados.git] / services / arv-git-httpd / auth_handler.go
index 39a9098c525b1830a1ffb688ed48d8fd03963725..fccb0c9576864634481a2e69b7237def54b6f0ec 100644 (file)
@@ -3,7 +3,6 @@ package main
 import (
        "log"
        "net/http"
-       "net/http/cgi"
        "os"
        "strings"
        "time"
@@ -16,7 +15,7 @@ import (
 var clientPool = arvadosclient.MakeClientPool()
 
 type authHandler struct {
-       handler *cgi.Handler
+       handler http.Handler
 }
 
 func (h *authHandler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
@@ -150,7 +149,5 @@ func (h *authHandler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
        }
        r.URL.Path = rewrittenPath
 
-       handlerCopy := *h.handler
-       handlerCopy.Env = append(handlerCopy.Env, "REMOTE_USER="+r.RemoteAddr) // Should be username
-       handlerCopy.ServeHTTP(&w, r)
+       h.handler.ServeHTTP(&w, r)
 }