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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-workhorse
Commits
e2d44377
Commit
e2d44377
authored
Dec 02, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X Content-Type is detected automatically
parent
5be33684
Pipeline
#127
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
blob.go
blob.go
+2
-2
No files found.
blob.go
View file @
e2d44377
...
...
@@ -294,12 +294,12 @@ func emitBlob(w http.ResponseWriter, repopath string, refpath string) {
w
.
Header
()
.
Set
(
"Content-Transfer-Encoding"
,
"binary"
)
w
.
Header
()
.
Set
(
"Content-Length"
,
fmt
.
Sprintf
(
"%d"
,
size
))
w
.
Header
()
.
Set
(
"X-Content-Type-Options"
,
"nosniff"
)
//w.Header().Set("Content-Type", "...") TODO image/jpeg...
// net/http sniffs stream and and automatically detects and sets
// Content-Type header. We do not have to do it ourselves
w
.
Header
()
.
Set
(
"Cache-Control"
,
"private"
)
// Rails sets this for IE compatibility
w
.
Header
()
.
Set
(
"ETag"
,
fmt
.
Sprintf
(
`"%s"`
,
sha1
))
//setRawHeaders(...) // TODO
w
.
WriteHeader
(
200
)
// Don't bother with HTTP 500 from this point on, just return
// XXX better use queryStdout instead of queryReader, but we could be
// holding some tail bytes in queryReader after chat phase
...
...
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