From 5ee0f02e239ea79c068d1544680133921c67a43b Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 9 Aug 2015 20:49:33 +0100 Subject: [PATCH] Fixed bug that stops Google Sheets API being able to authenticate --- java/src/com/google/gdata/client/http/GoogleGDataRequest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/src/com/google/gdata/client/http/GoogleGDataRequest.java b/java/src/com/google/gdata/client/http/GoogleGDataRequest.java index 9c037d51..ea1cc773 100644 --- a/java/src/com/google/gdata/client/http/GoogleGDataRequest.java +++ b/java/src/com/google/gdata/client/http/GoogleGDataRequest.java @@ -196,6 +196,10 @@ public GoogleCookie(URI uri, String cookieHeader) { */ private boolean matchDomain(String testDomain, String tailDomain) { + if (tailDomain.startsWith(".")) { + tailDomain= tailDomain.substring(1); + } + // Simple check if (!testDomain.endsWith(tailDomain)) { return false;