mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1362] http: response.WriteHeader on hijacked connection log warning #961
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#961
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @warioishere on GitHub (Jun 1, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1362
Hi there,
I'm occasionally seeing the following log warning in my ntfy server logs:
This seems to indicate that the server attempted to write an HTTP response header to a connection that was already hijacked (e.g. for long polling or streaming).
Context
Expected behavior
Ideally, this warning should not occur. If the connection has been hijacked (for streaming), the server should probably avoid calling
WriteHeader.Notes
Would it be possible to suppress this log or handle such cases more gracefully?
Thanks for your work on ntfy!
@wunter8 commented on GitHub (Jun 1, 2025):
This seems to be caused by my PR here: https://github.com/binwiederhier/ntfy/pull/1338
I was trying to pass errors (authentication errors specifically) in response to websocket requests since
wss://ntfy.sh/secret-topic-that-requires-auth/wswould return a 200 code and an empty body instead of returning a 403 and indicating to the user that authentication is required.Not sure right now what the best fix is
@bonfiresh commented on GitHub (Feb 3, 2026):
i have the same issue with the latest release
@binwiederhier commented on GitHub (Feb 3, 2026):
It's not really an issue, it's just log spam. But it is annoying, I agree.
@binwiederhier commented on GitHub (Feb 4, 2026):
Fixed in
github.com/binwiederhier/ntfy@08eaafa77b@warioishere commented on GitHub (Feb 4, 2026):
thanks!