Revert changes in HTTP header for backward compatibility.

This commit is contained in:
Zhen Tang 2018-12-13 09:13:51 +08:00
parent 98e447e146
commit 6fb97c44e7
2 changed files with 4 additions and 4 deletions

View File

@ -330,12 +330,12 @@ public class ClientWorker {
long timeout = TimeUnit.SECONDS.toMillis(30L); long timeout = TimeUnit.SECONDS.toMillis(30L);
List<String> headers = new ArrayList<String>(2); List<String> headers = new ArrayList<String>(2);
headers.add("Long-Polling-Timeout"); headers.add("Long-Pulling-Timeout");
headers.add("" + timeout); headers.add("" + timeout);
// told server do not hang me up if new initializing cacheData added in // told server do not hang me up if new initializing cacheData added in
if (isInitializingCacheList) { if (isInitializingCacheList) {
headers.add("Long-Polling-Timeout-No-Hangup"); headers.add("Long-Pulling-Timeout-No-Hangup");
headers.add("true"); headers.add("true");
} }

View File

@ -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_HEADER = "Long-Pulling-Timeout";
static public final String LONG_POLLING_NO_HANG_UP_HEADER = "Long-Polling-Timeout-No-Hangup"; static public final String LONG_POLLING_NO_HANG_UP_HEADER = "Long-Pulling-Timeout-No-Hangup";
final ScheduledExecutorService scheduler; final ScheduledExecutorService scheduler;