improve http vhost package

This commit is contained in:
fatedier
2017-12-13 03:27:43 +08:00
parent 63037f1c65
commit 7da61f004b
7 changed files with 586 additions and 24 deletions

View File

@@ -91,7 +91,7 @@ func (v *VhostMuxer) getListener(name, path string) (l *Listener, exist bool) {
// if not exist, then check the wildcard_domain such as *.example.com
vr, found := v.registryRouter.Get(name, path)
if found {
return vr.listener, true
return vr.payload.(*Listener), true
}
domainSplit := strings.Split(name, ".")
@@ -106,7 +106,7 @@ func (v *VhostMuxer) getListener(name, path string) (l *Listener, exist bool) {
return
}
return vr.listener, true
return vr.payload.(*Listener), true
}
func (v *VhostMuxer) run() {