[server] Fix resource resolution when using hosts.

This commit is contained in:
Ciprian Dorin Craciun 2022-08-26 17:42:36 +03:00
parent 137155cc1f
commit e7c8a0cc4d

View file

@ -155,14 +155,14 @@ func (_server *server) ServeUnwrapped (_context *fasthttp.RequestCtx) () {
var _referencesValues [2]uint64 var _referencesValues [2]uint64
var _referencesBuffer []byte var _referencesBuffer []byte
if !_referencesFound {
for _hostIdx := 0; _hostIdx < 2; _hostIdx += 1 { for _hostIdx := 0; _hostIdx < 2; _hostIdx += 1 {
if (_hostIdx == 0) && _server.hostsDisabled { if (_hostIdx == 0) && _server.hostsDisabled {
continue continue
} }
if !_referencesFound {
for _, _namespace := range _namespaces_a_static { for _, _namespace := range _namespaces_a_static {
if _server.cachedReferences != nil { if _server.cachedReferences != nil {
@ -195,11 +195,6 @@ func (_server *server) ServeUnwrapped (_context *fasthttp.RequestCtx) () {
break break
} }
} }
if _referencesFound {
break
}
}
} }
if !_referencesFound { if !_referencesFound {
@ -211,12 +206,6 @@ func (_server *server) ServeUnwrapped (_context *fasthttp.RequestCtx) () {
if !_referencesFound { if !_referencesFound {
for _hostIdx := 0; _hostIdx < 2; _hostIdx += 1 {
if (_hostIdx == 0) && _server.hostsDisabled {
continue
}
for for
_pathLimit := bytes.LastIndexByte (_path, '/'); _pathLimit := bytes.LastIndexByte (_path, '/');
_pathLimit >= 0; _pathLimit >= 0;
@ -261,12 +250,12 @@ func (_server *server) ServeUnwrapped (_context *fasthttp.RequestCtx) () {
break break
} }
} }
}
if _referencesFound { if _referencesFound {
break break
} }
} }
}
if !_referencesFound { if !_referencesFound {
if !_server.quiet { if !_server.quiet {