From 6fb97c44e7eb8becd95a89c0e05dc0dda948059f Mon Sep 17 00:00:00 2001 From: Zhen Tang Date: Thu, 13 Dec 2018 09:13:51 +0800 Subject: [PATCH] Revert changes in HTTP header for backward compatibility. --- .../com/alibaba/nacos/client/config/impl/ClientWorker.java | 4 ++-- .../nacos/config/server/service/LongPollingService.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java index 982f89671..5104460a6 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java @@ -330,12 +330,12 @@ public class ClientWorker { long timeout = TimeUnit.SECONDS.toMillis(30L); List headers = new ArrayList(2); - headers.add("Long-Polling-Timeout"); + headers.add("Long-Pulling-Timeout"); headers.add("" + timeout); // told server do not hang me up if new initializing cacheData added in if (isInitializingCacheList) { - headers.add("Long-Polling-Timeout-No-Hangup"); + headers.add("Long-Pulling-Timeout-No-Hangup"); headers.add("true"); } diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java index 4cd488003..a550c1969 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java @@ -285,8 +285,8 @@ public class LongPollingService extends AbstractEventListener { // ================= - static public final String LONG_POLLING_HEADER = "Long-Polling-Timeout"; - static public final String LONG_POLLING_NO_HANG_UP_HEADER = "Long-Polling-Timeout-No-Hangup"; + static public final String LONG_POLLING_HEADER = "Long-Pulling-Timeout"; + static public final String LONG_POLLING_NO_HANG_UP_HEADER = "Long-Pulling-Timeout-No-Hangup"; final ScheduledExecutorService scheduler;