Skip to content

Commit d13cc87

Browse files
committed
echance: fault injection in no Mesh-Real-Endpoint header case
1 parent 59ffd7a commit d13cc87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/proxy/http/http_proxy.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ func (t *tproxy) handleHTTP(resp http.ResponseWriter, req *http.Request) {
8989
klog.Infof("handel http request, url: %s ", realEndPointUrl.String())
9090
// faultinjection
9191
if enableRestFaultInjection {
92-
klog.Infof("start FaultInjectionRest %s", req.Header.Get(meshhttp.HeaderMeshRealEndpoint))
93-
result := t.FaultInjector.FaultInjectionRest(req.Header.Get(meshhttp.HeaderMeshRealEndpoint), req.Method)
92+
result := t.FaultInjector.FaultInjectionRest(realEp, req.Method)
9493
if result.Abort {
9594
apiErr := utils.HttpToAPIError(int(result.ErrCode), req.Method, result.Message)
9695
if apiErr.Code != http.StatusOK {

0 commit comments

Comments
 (0)