add missing journaling

This commit is contained in:
d1slike committed 2020-03-20 14:50:35 +03:00
1 parent c31c6aaf81
commit f0b8407479
3 files changed
+5 -7

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
* add content-type, content-length header to response
* close journal
* journal module is not more required
* add missing journaling
## 2.6.0
* migrate to go mod
## 2.5.4
+3 -3
View File
@@ -31,7 +31,7 @@ func (p handleJsonDesc) Complete(c *fasthttp.RequestCtx, method string, client *
if err != nil {
logHandlerError(log_code.TypeData.JsonContent, methodName, err)
utils.WriteError(c, errorMsgInternal, codes.Internal, nil)
return domain.Create().SetError(err)
return domain.Create().SetRequestBody(body).SetResponseBody(c.Response.Body()).SetError(err)
}
msg, invokerErr := cli.Request(
@@ -46,10 +46,10 @@ func (p handleJsonDesc) Complete(c *fasthttp.RequestCtx, method string, client *
c.SetContentTypeBytes(utils.JsonContentType)
c.Response.Header.SetContentLength(len(response))
_, _ = c.Write(response)
return domain.Create().SetError(invokerErr)
return domain.Create().SetRequestBody(body).SetResponseBody(c.Response.Body()).SetError(invokerErr)
} else {
logHandlerError(log_code.TypeData.JsonContent, methodName, err)
utils.WriteError(c, errorMsgInternal, codes.Internal, nil)
return domain.Create().SetError(err)
return domain.Create().SetRequestBody(body).SetResponseBody(c.Response.Body()).SetError(err)
}
}
+1 -4
View File
@@ -127,10 +127,7 @@ func (p *websocketProxy) ProxyRequest(ctx *fasthttp.RequestCtx, path string) dom
}
})
return domain.Create().
SetRequestBody(ctx.Request.Body()).
SetResponseBody(ctx.Response.Body()).
SetError(err)
return domain.Create().SetError(err)
}
func (p *websocketProxy) SkipAuth() bool {