Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
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
nexedi
caddy
Commits
c33a49fc
Commit
c33a49fc
authored
Apr 27, 2015
by
Matt Holt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from thomas4019/master
gzip middleware now strips encoding header
parents
a837bb66
dbef6c73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
middleware/fastcgi/fastcgi.go
middleware/fastcgi/fastcgi.go
+5
-7
No files found.
middleware/fastcgi/fastcgi.go
View file @
c33a49fc
...
...
@@ -5,9 +5,7 @@ package fastcgi
import
(
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
...
...
@@ -105,11 +103,11 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
}
w
.
WriteHeader
(
resp
.
StatusCode
)
body
,
err
:=
ioutil
.
ReadAll
(
resp
.
Body
)
fmt
.
Printf
(
"%s"
,
b
ody
)
fmt
.
Printf
(
"%d
\n
"
,
resp
.
StatusCode
)
fmt
.
Printf
(
"%d
\n
"
,
len
(
body
))
w
.
Write
(
body
)
// Write the response body
_
,
err
=
io
.
Copy
(
w
,
resp
.
B
ody
)
if
err
!=
nil
{
return
http
.
StatusBadGateway
,
err
}
return
resp
.
StatusCode
,
nil
}
...
...
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