Skip to content

Commit

Permalink
fix GitHub notification interface return "Unable to parse If-Modified…
Browse files Browse the repository at this point in the history
…-Since request header"
  • Loading branch information
AsherSu committed Nov 12, 2024
1 parent e4ef482 commit 11c65f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/kohsuke/github/GHNotificationStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ GHThread fetch() {
Thread.sleep(waitTime);
}

req.setHeader("If-Modified-Since", lastModified);
if (lastModified != null) {
req.setHeader("If-Modified-Since", lastModified);

Check warning on line 191 in src/main/java/org/kohsuke/github/GHNotificationStream.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/kohsuke/github/GHNotificationStream.java#L191

Added line #L191 was not covered by tests
}

Requester requester = req.withUrlPath(apiUrl);
GitHubResponse<GHThread[]> response = ((GitHubPageContentsIterable<GHThread>) requester
Expand Down

0 comments on commit 11c65f4

Please sign in to comment.