diff --git a/src/main/java/org/kohsuke/github/GHNotificationStream.java b/src/main/java/org/kohsuke/github/GHNotificationStream.java index 7e62d7b6c6..f769907125 100644 --- a/src/main/java/org/kohsuke/github/GHNotificationStream.java +++ b/src/main/java/org/kohsuke/github/GHNotificationStream.java @@ -187,7 +187,9 @@ GHThread fetch() { Thread.sleep(waitTime); } - req.setHeader("If-Modified-Since", lastModified); + if (lastModified != null) { + req.setHeader("If-Modified-Since", lastModified); + } Requester requester = req.withUrlPath(apiUrl); GitHubResponse response = ((GitHubPageContentsIterable) requester