Skip to content

docs(rum): explain that compressed HTML is not injected - #155

Merged
iamluc merged 3 commits into
mainfrom
luc.vieillescazes/rum-doc-compressed-html
Nov 25, 2026
Merged

iamluc merged 3 commits into
mainfrom
luc.vieillescazes/rum-doc-compressed-html

Conversation

@iamluc

@iamluc iamluc commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Overview

Document that RUM injection skips HTML that already has Content-Encoding
(reason:compressed_html), and how to inject while the client still gets gzip.

Motivation

With mod_proxy, Apache forwards the client Accept-Encoding: gzip, so the backend often returns
gzip HTML. The module cannot read it and sends it unchanged.

The workaround is AddOutputFilterByType INFLATE;DEFLATE text/html. INFLATE runs before the RUM
filter and removes Content-Encoding; DEFLATE compresses again for the client.
RequestHeader unset Accept-Encoding does not work alone: mod_deflate reads the same header, so
the client gets uncompressed HTML.

Additional Notes

Tested:

  • New integration test test_rum_streaming_injects_after_inflate: gzip upstream, client with
    Accept-Encoding: gzip, snippet injected and Content-Encoding: gzip.
    make test-integration: 137 passed, 1 skipped.
  • Manual end to end check in the devcontainer (backend gzips only when asked):
    • no workaround: client gets gzip, not injected.
    • RequestHeader unset Accept-Encoding: injected, client not compressed.
    • INFLATE;DEFLATE (SetOutputFilter or AddOutputFilterByType): injected, client gets gzip.
    • AddOutputFilterByType leaves gzip JavaScript from the backend untouched.

References

Jira ticket: INPLAT-1455

Contributor Checklist

  • I am the author of this pull request and I own it.
  • I reviewed every line of this pull request.
  • This pull request follows the Contributing Guidelines.

Document the INFLATE;DEFLATE workaround for proxied gzip HTML and test it. Refs INPLAT-1455.
@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 54.64% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 213c3dd | Docs | Give us feedback!

@iamluc
iamluc marked this pull request as ready for review November 25, 2026 12:43
@iamluc
iamluc requested a review from a team as a code owner November 25, 2026 12:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T12:44:23.860851Z 213c3dd Draft marked ready
🔒 Security Review ✅ Completed 2026-11-25T12:46:28.966490Z 213c3dd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@iamluc
iamluc merged commit 5865e17 into main Nov 25, 2026
42 checks passed
@iamluc
iamluc deleted the luc.vieillescazes/rum-doc-compressed-html branch November 25, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants