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
dbef6c73
Commit
dbef6c73
authored
Apr 27, 2015
by
Thomas Hansen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/mholt/caddy
parents
9d26a926
fa2403c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
middleware/gzip/gzip.go
middleware/gzip/gzip.go
+3
-1
middleware/websockets/websockets.go
middleware/websockets/websockets.go
+1
-1
server/server.go
server/server.go
+2
-0
No files found.
middleware/gzip/gzip.go
View file @
dbef6c73
...
...
@@ -33,7 +33,9 @@ func (g Gzip) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
return
g
.
Next
.
ServeHTTP
(
w
,
r
)
}
r
.
Header
.
Del
(
"Accept-Encoding"
)
// Removes header to prevent double encoding by ambitious fastcgi implementations
// Delete this header so gzipping isn't repeated later in the chain
r
.
Header
.
Del
(
"Accept-Encoding"
)
w
.
Header
()
.
Set
(
"Content-Encoding"
,
"gzip"
)
gzipWriter
:=
gzip
.
NewWriter
(
w
)
defer
gzipWriter
.
Close
()
...
...
middleware/websockets/websockets.go
View file @
dbef6c73
...
...
@@ -130,5 +130,5 @@ var (
const
(
envGatewayInterface
=
"caddy-CGI/1.1"
envServerSoftware
=
"caddy/
?.?.?"
// TODO
envServerSoftware
=
"caddy/
"
// TODO: Version
)
server/server.go
View file @
dbef6c73
...
...
@@ -162,6 +162,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
if
vh
,
ok
:=
s
.
vhosts
[
host
];
ok
{
w
.
Header
()
.
Set
(
"Server"
,
"Caddy"
)
status
,
_
:=
vh
.
stack
.
ServeHTTP
(
w
,
r
)
// Fallback error response in case error handling wasn't chained in
...
...
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