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
Łukasz Nowak
caddy
Commits
ccdc2863
Commit
ccdc2863
authored
Feb 21, 2017
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpserver: Remove unused ReadTimeout from tlsHelloListener
parent
a2c410b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
caddyhttp/httpserver/mitm.go
caddyhttp/httpserver/mitm.go
+4
-7
caddyhttp/httpserver/server.go
caddyhttp/httpserver/server.go
+1
-1
No files found.
caddyhttp/httpserver/mitm.go
View file @
ccdc2863
...
...
@@ -9,7 +9,6 @@ import (
"net/http"
"strings"
"sync"
"time"
)
// tlsHandler is a http.Handler that will inject a value
...
...
@@ -253,11 +252,10 @@ func parseRawClientHello(data []byte) (info rawHelloInfo) {
}
// newTLSListener returns a new tlsHelloListener that wraps ln.
func
newTLSListener
(
ln
net
.
Listener
,
config
*
tls
.
Config
,
readTimeout
time
.
Duration
)
*
tlsHelloListener
{
func
newTLSListener
(
ln
net
.
Listener
,
config
*
tls
.
Config
)
*
tlsHelloListener
{
return
&
tlsHelloListener
{
Listener
:
ln
,
config
:
config
,
readTimeout
:
readTimeout
,
helloInfos
:
make
(
map
[
string
]
rawHelloInfo
),
}
}
...
...
@@ -270,7 +268,6 @@ func newTLSListener(ln net.Listener, config *tls.Config, readTimeout time.Durati
type
tlsHelloListener
struct
{
net
.
Listener
config
*
tls
.
Config
readTimeout
time
.
Duration
helloInfos
map
[
string
]
rawHelloInfo
helloInfosMu
sync
.
RWMutex
}
...
...
caddyhttp/httpserver/server.go
View file @
ccdc2863
...
...
@@ -247,7 +247,7 @@ func (s *Server) Serve(ln net.Listener) error {
// not implement the File() method we need for graceful restarts
// on POSIX systems.
// TODO: Is this ^ still relevant anymore? Maybe we can now that it's a net.Listener...
ln
=
newTLSListener
(
ln
,
s
.
Server
.
TLSConfig
,
s
.
Server
.
ReadTimeout
)
ln
=
newTLSListener
(
ln
,
s
.
Server
.
TLSConfig
)
if
handler
,
ok
:=
s
.
Server
.
Handler
.
(
*
tlsHandler
);
ok
{
handler
.
listener
=
ln
.
(
*
tlsHelloListener
)
}
...
...
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