[server] Minor update and fixup

This commit is contained in:
Ciprian Dorin Craciun 2018-11-14 19:51:13 +02:00
parent 3d32709f64
commit 0323a10e4e

View file

@ -101,7 +101,7 @@ func (_server *server) HandleHTTP (_context *fasthttp.RequestCtx) () {
if _value != nil { if _value != nil {
_fingerprint = _value _fingerprint = _value
if (_namespace == NamespaceFoldersContent) || (_namespace == NamespaceFoldersEntries) { if (_namespace == NamespaceFoldersContent) || (_namespace == NamespaceFoldersEntries) {
if !_pathHasSlash { if !_pathIsRoot && !_pathHasSlash {
_path = append (_path, '/') _path = append (_path, '/')
_server.ServeRedirect (_context, http.StatusTemporaryRedirect, _path) _server.ServeRedirect (_context, http.StatusTemporaryRedirect, _path)
return return
@ -117,7 +117,7 @@ func (_server *server) HandleHTTP (_context *fasthttp.RequestCtx) () {
} { } {
_key := _keyBuffer[:0] _key := _keyBuffer[:0]
_key = append (_key, NamespaceFilesContent ...) _key = append (_key, NamespaceFilesContent ...)
_key = append (_key, '/') _key = append (_key, ':')
if !_pathIsRoot { if !_pathIsRoot {
_key = append (_key, _path_0 ...) _key = append (_key, _path_0 ...)
} }
@ -332,7 +332,7 @@ func main_0 () (error) {
debug.SetGCPercent (50) debug.SetGCPercent (50)
debug.SetMaxThreads (128) debug.SetMaxThreads (128)
debug.SetMaxStack (128 * 1024 * 1024) debug.SetMaxStack (16 * 1024)
_httpServerReduceMemory := false _httpServerReduceMemory := false