From ed82471064e1c076a78fea6c601edbcfdcf9dab9 Mon Sep 17 00:00:00 2001 From: heyile <2513931335@qq.com> Date: Wed, 30 Jan 2019 19:03:30 +0800 Subject: [PATCH] [SCB-1143]Servicecomb support watch service center with auth headers --- .../serviceregistry/client/http/WebsocketUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/WebsocketUtils.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/WebsocketUtils.java index 70625dad26..39db844a9b 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/WebsocketUtils.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/WebsocketUtils.java @@ -26,6 +26,7 @@ import io.vertx.core.Handler; import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; /** * Created by on 2017/4/28. @@ -44,8 +45,8 @@ public static void open(IpPort ipPort, String url, Handler onOpen, Handler client.websocket(ipPort.getPort(), ipPort.getHostOrIp(), url, - RestUtils.getDefaultHeaders().addAll(RestUtils - .getSignAuthHeaders(RestUtils.createSignRequest(null, ipPort, new RequestParam(), url, new HashMap<>()))), + RestUtils.getDefaultHeaders().addAll(RestUtils.getSignAuthHeaders( + RestUtils.createSignRequest(HttpMethod.GET.name(), ipPort, new RequestParam(), url, new HashMap<>()))), ws -> { onOpen.handle(null);