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