test(ds03): 记录对象拒绝的网关原始响应
build / build (push) Successful in 1m26s

拒绝事件补 503 与原始正文,证据可直接引用网关响应,而不只依赖客户端错误文本。
This commit is contained in:
姚章浩
2026-11-02 04:47:26 +08:00
parent b39902ef90
commit 2cbeca8d1d
@@ -244,7 +244,9 @@ func newR38ObjectRefusalProxy(t *testing.T, root, upstream string) *r38ObjectRef
"method": r.Method, "path": r.URL.RequestURI(), "request": envelope.Request,
"authorization": envelope.Authorization, "body": string(raw),
"receiver": p.upstream, "gateway_scope": r.Header.Get("X-KG-Gateway-Scope"),
"dispatched": false, "forwarded": false, "refused": true,
"response_status": http.StatusServiceUnavailable,
"response_body": "r38 injected object restore refusal before dispatch\n",
"dispatched": false, "forwarded": false, "refused": true,
"at": time.Now().UTC().Format(time.RFC3339Nano)})
p.flush()
p.mu.Unlock()