Commit 3954048a authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'return_response_to_client' into 'master'

Forward store response to client.

Part of gitlab-org/gitlab-ce#2955

Forward received response to the client.

See merge request !11
parents c75879e6 f18054fa
......@@ -78,18 +78,18 @@ func handleStoreLfsObject(w http.ResponseWriter, r *gitRequest) {
}
r.Header.Set("X-GitLab-Lfs-Tmp", filepath.Base(file.Name()))
authReq, err := r.u.newUpstreamRequest(r.Request, nil, "")
storeReq, err := r.u.newUpstreamRequest(r.Request, nil, "")
if err != nil {
fail500(w, "newUpstreamRequestlfsCallback", err)
fail500(w, "newUpstreamRequestLfsStoreCallback", err)
return
}
authResponse, err := r.u.httpClient.Do(authReq)
storeResponse, err := r.u.httpClient.Do(storeReq)
if err != nil {
fail500(w, "doRequestlfsCallback", err)
fail500(w, "doRequestLfsStoreCallback", err)
return
}
defer authResponse.Body.Close()
defer storeResponse.Body.Close()
return
forwardResponseToClient(w, storeResponse)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment