HTTP/1.1 subscriptions never receive data (nginx proxy buffering)
-
Subscribing to a topic as a stream (GET /<topic>/json?poll=false, also /sse and /raw) never returns anything over HTTP/1.1 on my ntfy instance: the TLS handshake and request complete, but nothing comes back (not even the response headers). The same request over HTTP/2 works and delivers the open event and a keepalive every 45 seconds. Short requests over HTTP/1.1 are fine (poll=1, /v1/health, publishing).
This is for a private ntfy topic, and you can reproduce the issue like this:
curl -sN --http1.1 -m 120 -H "Authorization: Bearer $TOKEN" "https://ntfy.example.com/mytopic/json?poll=false"
-> nothing for 120 seconds
curl -sN --http2 -m 120 -H "Authorization: Bearer $TOKEN" "https://ntfy.example.com/mytopic/json?poll=false"
-> {"event":"open",...} at once, then a keepalive every 45 sntfy's reverse-proxy docs (https://docs.ntfy.sh/config/#nginxapache2caddy) require
proxy_buffering off(andproxy_request_buffering off) for this reason. Clients that speak HTTP/1.1, such as Python's httpx or the ntfy CLI in some setups, hit this; browsers and curl usually negotiate HTTP/2 and don't.Would it be possible for the ntfy package's nginx location to get
proxy_buffering off? -
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login