[PR #469] [MERGED] Fix bug where GET or HEAD action requests could not be made from the web client #1311

Closed
opened 2026-05-07 01:01:30 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/469
Author: @ollien
Created: 11/7/2022
Status: Merged
Merged: 11/7/2022
Merged by: @binwiederhier

Base: mainHead: fetch-get-body


📝 Commits (1)

  • 93cacc3 Fix bug where GET or HEAD action requests could not be made from the web client

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 web/src/components/Notifications.js (+3 -1)

📄 Description

See #468 for details on the bug this fixes.

The cause of this comes down to a subtlety of the fetch API. If body is anything that is non-nullish, the browser will spit back that a body is not allowed for a GET/HEAD request. The fix is just to remove the null coalesce :)

Closes #468


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/469 **Author:** [@ollien](https://github.com/ollien) **Created:** 11/7/2022 **Status:** ✅ Merged **Merged:** 11/7/2022 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `fetch-get-body` --- ### 📝 Commits (1) - [`93cacc3`](https://github.com/binwiederhier/ntfy/commit/93cacc3a53bbd2a3ee6a47c454890bc4e541860e) Fix bug where GET or HEAD action requests could not be made from the web client ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `web/src/components/Notifications.js` (+3 -1) </details> ### 📄 Description See #468 for details on the bug this fixes. The cause of this comes down to a subtlety of the `fetch` API. If `body` is anything that is non-nullish, the browser will spit back that a body is not allowed for a GET/HEAD request. The fix is just to remove the null coalesce :) Closes #468 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:30 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1311
No description provided.