nextcloud / nextcloud/richdocuments

Feature Request: Full HTTP/2 support (RFC 8441) for WebSocket connections via reverse proxy

Open
#5,561 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

Summary

When Collabora Online (built-in CODE server via Nextcloud's richdocumentscode app) is deployed behind a reverse proxy (HAProxy) with HTTP/2 enabled end-to-end, document loading fails due to WebSocket tunneling incompatibilities. HTTP/2 support for WebSocket connections (RFC 8441) would resolve this.

Environment

  • Collabora Online: built-in CODE server (richdocumentscode Nextcloud app)
  • Nextcloud version: latest (as of April 2026)
  • Reverse proxy: HAProxy 3.2.14 (OPNsense)
  • Web server: Apache + php-fpm
  • Internal Collabora port: 9983 (HTTP, no TLS)
  • OS: RHEL-based Linux

Current Behavior

When HAProxy has HTTP/2 enabled on the backend connection (HAProxy → Apache/Nextcloud), the WebSocket tunnel through Nextcloud's proxy.php fails with:

net::ERR_HTTP2_PROTOCOL_ERROR
net::ERR_CONTENT_LENGTH_MISMATCH
Document loading failed due to timeout: Please check for failing network requests

The coolwsd process runs correctly on port 9983 and responds to direct HTTP requests:

curl http://localhost:9983/
OK

The issue is not with coolwsd itself, but with the WebSocket tunneling layer when HTTP/2 is involved in the proxy chain.

Workaround

Force HTTP/1.1 on the HAProxy backend connection. This works but prevents end-to-end HTTP/2 optimization:

  • Disable HTTP/2 on HAProxy backend pool
  • Keep only HTTP/1.1 in ALPN for backend
  • Add timeout tunnel 3600s to backend options

Expected Behavior

Collabora Online should work correctly in HTTP/2 reverse proxy environments. WebSocket over HTTP/2 has been standardized since RFC 8441 (September 2018) — nearly 8 years ago.

Feature Request

  1. Ensure coolwsd fully supports RFC 8441 (WebSocket over HTTP/2)
  2. Ensure the WebSocket handshake and tunneling work correctly when the proxy chain uses HTTP/2 (either end-to-end or partially)
  3. Document the recommended HAProxy/nginx configuration for HTTP/2 deployments in the official docs

Why This Matters

HTTP/2 is now the standard for modern web deployments and brings significant performance improvements (multiplexing, header compression, reduced latency). Requiring a downgrade to HTTP/1.1 on the backend is a workaround that should not be necessary in 2026.

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the WebSocket tunnel through Nextcloud's proxy.php to the built-in CODE server on port 9983, and review the RFC 8441 requirements for the HTTP/2 proxy chain. Compare behavior with HAProxy's HTTP/1.1 workaround. Done means HTTP/2 WebSocket connections work without that downgrade and the recommended HAProxy/nginx configuration is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache
Domain
backend-api-design, documentation, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.