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
1632cfe6
Commit
1632cfe6
authored
Nov 05, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove 2xx check in xSendFile
parent
2dbb5485
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
main_test.go
main_test.go
+1
-1
xsendfile.go
xsendfile.go
+1
-1
No files found.
main_test.go
View file @
1632cfe6
...
...
@@ -287,7 +287,7 @@ func TestDeniedXSendfileDownload(t *testing.T) {
t
.
Fatalf
(
`X-Sendfile-Type want "X-Sendfile" got %q`
,
xSendfileType
)
}
w
.
Header
()
.
Set
(
"Content-Disposition"
,
fmt
.
Sprintf
(
`attachment; filename="%s"`
,
contentFilename
))
w
.
WriteHeader
(
404
)
w
.
WriteHeader
(
200
)
fmt
.
Fprint
(
w
,
"Denied"
)
}))
defer
ts
.
Close
()
...
...
xsendfile.go
View file @
1632cfe6
...
...
@@ -38,7 +38,7 @@ func xSendFile(u *upstream, w http.ResponseWriter, r *http.Request, _ func(http.
}
// Use accelerated file serving
if
sendfile
==
""
&&
upResponse
.
StatusCode
/
100
!=
2
{
if
sendfile
==
""
{
// Copy request body otherwise
w
.
WriteHeader
(
upResponse
.
StatusCode
)
...
...
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