Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
f0d1d714
Commit
f0d1d714
authored
Dec 31, 2016
by
kbynd
Committed by
GitHub
Dec 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update output.go
parent
96387e9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
output.go
context/output.go
+5
-2
No files found.
context/output.go
View file @
f0d1d714
...
...
@@ -67,8 +67,11 @@ func (output *BeegoOutput) Body(content []byte) error {
}
if
b
,
n
,
_
:=
WriteBody
(
encoding
,
buf
,
content
);
b
{
output
.
Header
(
"Content-Encoding"
,
n
)
}
output
.
Header
(
"Content-Length"
,
strconv
.
Itoa
(
len
(
content
)))
output
.
Header
(
"Content-Length"
,
strconv
.
Itoa
(
buf
.
Len
()))
}
else
{
output
.
Header
(
"Content-Length"
,
strconv
.
Itoa
(
len
(
content
)))
}
// Write status code if it has been set manually
// Set it to 0 afterwards to prevent "multiple response.WriteHeader calls"
...
...
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