Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-workhorse
Commits
0c813ebe
Commit
0c813ebe
authored
Dec 14, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run "go fmt" for Kamil
parent
b912293a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
helpers.go
helpers.go
+1
-1
upstream.go
upstream.go
+10
-10
No files found.
helpers.go
View file @
0c813ebe
...
...
@@ -11,8 +11,8 @@ import (
"net/http"
"os"
"os/exec"
"syscall"
"path"
"syscall"
)
func
fail500
(
w
http
.
ResponseWriter
,
err
error
)
{
...
...
upstream.go
View file @
0c813ebe
...
...
@@ -7,12 +7,12 @@ In this file we handle request routing and interaction with the authBackend.
package
main
import
(
"fmt"
"log"
"net/http"
"net/http/httputil"
"net/url"
"strings"
"fmt"
)
type
serviceHandleFunc
func
(
w
http
.
ResponseWriter
,
r
*
gitRequest
)
...
...
@@ -27,29 +27,29 @@ type upstream struct {
type
authorizationResponse
struct
{
// GL_ID is an environment variable used by gitlab-shell hooks during 'git
// push' and 'git pull'
GL_ID
string
GL_ID
string
// RepoPath is the full path on disk to the Git repository the request is
// about
RepoPath
string
RepoPath
string
// ArchivePath is the full path where we should find/create a cached copy
// of a requested archive
ArchivePath
string
ArchivePath
string
// ArchivePrefix is used to put extracted archive contents in a
// subdirectory
ArchivePrefix
string
// CommitId is used do prevent race conditions between the 'time of check'
// in the GitLab Rails app and the 'time of use' in gitlab-workhorse.
CommitId
string
CommitId
string
// StoreLFSPath is provided by the GitLab Rails application
// to mark where the tmp file should be placed
StoreLFSPath
string
StoreLFSPath
string
// LFS object id
LfsOid
string
LfsOid
string
// LFS object size
LfsSize
int64
LfsSize
int64
// TmpPath is the path where we should store temporary files
// This is set by authorization middleware
TempPath
string
TempPath
string
}
// A gitRequest is an *http.Request decorated with attributes returned by the
...
...
@@ -57,7 +57,7 @@ type authorizationResponse struct {
type
gitRequest
struct
{
*
http
.
Request
authorizationResponse
u
*
upstream
u
*
upstream
// This field contains the URL.Path stripped from RelativeUrlRoot
relativeURIPath
string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment