mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[GH-ISSUE #1678] S3 attachment uploads fail with HTTP/2 PROTOCOL_ERROR on DigitalOcean Spaces #1169
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#1169
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 @binwiederhier on GitHub (Mar 27, 2026).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1678
Bug description
When using DigitalOcean Spaces as the S3 attachment backend, some uploads fail with HTTP/2 stream errors:
Users see an HTTP 500 (ntfy error 50001) response when publishing messages with attachments.
Root cause
Go's default HTTP client negotiates HTTP/2 via ALPN. Some S3-compatible providers (DigitalOcean Spaces, MinIO, and others) have incomplete or buggy HTTP/2 implementations that can send
RST_STREAMwithPROTOCOL_ERRORmid-upload. Go's HTTP/2 transport cannot retry the request because the streaming body has already been consumed (noGetBodyis defined).This is a well-documented issue across multiple projects:
--s3-disable-http2to work around it: https://github.com/rclone/rclone/issues/4673Fix
Add a
disable_http2=truequery parameter to the S3 URL configuration that forces the S3 client to use HTTP/1.1 only:When set, the HTTP client is constructed with
TLSNextProtoset to an empty map, which prevents HTTP/2 ALPN negotiation — the same approach used by rclone.@binwiederhier commented on GitHub (Mar 27, 2026):
Solved in #1679