From e6fea4c061301701201fd32975162f25f33c8687 Mon Sep 17 00:00:00 2001 From: Snowyfox Date: Tue, 31 May 2022 03:39:56 -0400 Subject: [PATCH] Fixed bug when redraft makes no changes (Before this, JKomasto and sometimes the Mastodon web client would get '411 Record Not Found' when submitting the same text after deleting and redrafting. Presumably the Mastodon server caches both whether an idempotency key was fulfilled and which post it leads to, and for some reason it looks up the second and fails.) --- BasicHTMLParser.java | 0 ClipboardApi.java | 0 ComposeWindow.java | 0 ImageApi.java | 0 ImageWindow.java | 0 JKomasto.java | 0 LoginWindow.java | 0 MastodonApi.java | 2 +- NotificationsWindow.java | 0 PostWindow.java | 0 ProfileWindow.java | 0 RepliesWindow.java | 0 RequestListener.java | 0 RichTextPane.java | 0 RichTextPane2.java | 0 RichTextPane3.java | 0 RudimentaryHTMLParser.java | 0 TimelineWindow.java | 0 TwoToggleButton.java | 0 WindowUpdater.java | 0 20 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 BasicHTMLParser.java mode change 100755 => 100644 ClipboardApi.java mode change 100755 => 100644 ComposeWindow.java mode change 100755 => 100644 ImageApi.java mode change 100755 => 100644 ImageWindow.java mode change 100755 => 100644 JKomasto.java mode change 100755 => 100644 LoginWindow.java mode change 100755 => 100644 MastodonApi.java mode change 100755 => 100644 NotificationsWindow.java mode change 100755 => 100644 PostWindow.java mode change 100755 => 100644 ProfileWindow.java mode change 100755 => 100644 RepliesWindow.java mode change 100755 => 100644 RequestListener.java mode change 100755 => 100644 RichTextPane.java mode change 100755 => 100644 RichTextPane2.java mode change 100755 => 100644 RichTextPane3.java mode change 100755 => 100644 RudimentaryHTMLParser.java mode change 100755 => 100644 TimelineWindow.java mode change 100755 => 100644 TwoToggleButton.java mode change 100755 => 100644 WindowUpdater.java diff --git a/BasicHTMLParser.java b/BasicHTMLParser.java old mode 100755 new mode 100644 diff --git a/ClipboardApi.java b/ClipboardApi.java old mode 100755 new mode 100644 diff --git a/ComposeWindow.java b/ComposeWindow.java old mode 100755 new mode 100644 diff --git a/ImageApi.java b/ImageApi.java old mode 100755 new mode 100644 diff --git a/ImageWindow.java b/ImageWindow.java old mode 100755 new mode 100644 diff --git a/JKomasto.java b/JKomasto.java old mode 100755 new mode 100644 diff --git a/LoginWindow.java b/LoginWindow.java old mode 100755 new mode 100644 diff --git a/MastodonApi.java b/MastodonApi.java old mode 100755 new mode 100644 index 1a681fa..360fb42 --- a/MastodonApi.java +++ b/MastodonApi.java @@ -300,7 +300,7 @@ MastodonApi { HttpURLConnection conn = cast(endpoint.openConnection()); String s1 = "Bearer " + token; conn.setRequestProperty("Authorization", s1); - String s2 = Integer.toString(text.hashCode()); + String s2 = Integer.toString(handler.hashCode()); conn.setRequestProperty("Idempotency-Key", s2); conn.setDoOutput(true); conn.setRequestMethod("POST"); diff --git a/NotificationsWindow.java b/NotificationsWindow.java old mode 100755 new mode 100644 diff --git a/PostWindow.java b/PostWindow.java old mode 100755 new mode 100644 diff --git a/ProfileWindow.java b/ProfileWindow.java old mode 100755 new mode 100644 diff --git a/RepliesWindow.java b/RepliesWindow.java old mode 100755 new mode 100644 diff --git a/RequestListener.java b/RequestListener.java old mode 100755 new mode 100644 diff --git a/RichTextPane.java b/RichTextPane.java old mode 100755 new mode 100644 diff --git a/RichTextPane2.java b/RichTextPane2.java old mode 100755 new mode 100644 diff --git a/RichTextPane3.java b/RichTextPane3.java old mode 100755 new mode 100644 diff --git a/RudimentaryHTMLParser.java b/RudimentaryHTMLParser.java old mode 100755 new mode 100644 diff --git a/TimelineWindow.java b/TimelineWindow.java old mode 100755 new mode 100644 diff --git a/TwoToggleButton.java b/TwoToggleButton.java old mode 100755 new mode 100644 diff --git a/WindowUpdater.java b/WindowUpdater.java old mode 100755 new mode 100644