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.)
This commit is contained in:
Snowyfox 2022-05-31 03:39:56 -04:00
parent df6b7e149e
commit e6fea4c061
20 changed files with 1 additions and 1 deletions

0
BasicHTMLParser.java Executable file → Normal file
View File

0
ClipboardApi.java Executable file → Normal file
View File

0
ComposeWindow.java Executable file → Normal file
View File

0
ImageApi.java Executable file → Normal file
View File

0
ImageWindow.java Executable file → Normal file
View File

0
JKomasto.java Executable file → Normal file
View File

0
LoginWindow.java Executable file → Normal file
View File

2
MastodonApi.java Executable file → Normal file
View File

@ -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");

0
NotificationsWindow.java Executable file → Normal file
View File

0
PostWindow.java Executable file → Normal file
View File

0
ProfileWindow.java Executable file → Normal file
View File

0
RepliesWindow.java Executable file → Normal file
View File

0
RequestListener.java Executable file → Normal file
View File

0
RichTextPane.java Executable file → Normal file
View File

0
RichTextPane2.java Executable file → Normal file
View File

0
RichTextPane3.java Executable file → Normal file
View File

0
RudimentaryHTMLParser.java Executable file → Normal file
View File

0
TimelineWindow.java Executable file → Normal file
View File

0
TwoToggleButton.java Executable file → Normal file
View File

0
WindowUpdater.java Executable file → Normal file
View File