Skip to content

Raise http_request rx buffer to 5120 for GitHub's CSP header#94

Merged
bharvey88 merged 1 commit into
betafrom
fix-buffer-size
Jul 8, 2026
Merged

Raise http_request rx buffer to 5120 for GitHub's CSP header#94
bharvey88 merged 1 commit into
betafrom
fix-buffer-size

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Version: 26.7.8.7

What does this implement/fix?

Follow-up to #93: the 2048-byte rx buffer is still too small. The redirect on GitHub release-asset downloads carries a ~3.6 KB Content-Security-Policy header line, and esp_http_client requires each header line to fit the rx buffer - so beta manifest fetches kept failing with HTTP_CLIENT: Out of buffer even on 26.7.8.6 (confirmed on hardware; measured Content-Security-Policy at 3585 bytes today). Raised to 5120 for headroom.

Silver lining from the same hardware test: #93's manifest guard worked - after the failed fetch it refused to install, so no wrong-channel downgrade and no lost WiFi this time.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Increased network receive buffering for several device configurations to better handle larger download redirects and response headers, reducing “out of buffer” failures.
    • Updated one integration version to the latest release number.

The redirect on release-asset downloads carries a ~3.6 KB
Content-Security-Policy header line; esp_http_client requires each
header line to fit the rx buffer, so 2048 still failed with
"HTTP_CLIENT: Out of buffer" (confirmed on hardware running 26.7.8.6;
the new manifest guard correctly refused to install, so no downgrade).

Version: 26.7.8.7

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5b94e0a7-7bca-4468-9095-7ba39d221ce8

📥 Commits

Reviewing files that changed from the base of the PR and between 34c7677 and 0b7f590.

📒 Files selected for processing (4)
  • Integrations/ESPHome/Core.yaml
  • Integrations/ESPHome/MSR-1.yaml
  • Integrations/ESPHome/MSR-1_BLE.yaml
  • Integrations/ESPHome/MSR-1_Factory.yaml

Walkthrough

This PR increases the http_request buffer_size_rx from 2048 to 5120 bytes in three ESPHome MSR-1 YAML configurations to prevent "HTTP_CLIENT: Out of buffer" errors from large redirect headers, updates related comments, and bumps the version substitution in Core.yaml.

Changes

ESPHome config updates

Layer / File(s) Summary
HTTP request receive buffer increase
Integrations/ESPHome/MSR-1.yaml, Integrations/ESPHome/MSR-1_BLE.yaml, Integrations/ESPHome/MSR-1_Factory.yaml
buffer_size_rx increased from 2048 to 5120 in each file, with comments updated to explain redirect/CSP header buffering issues.
Version substitution bump
Integrations/ESPHome/Core.yaml
The version substitution value incremented from 26.7.8.6 to 26.7.8.7.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • ApolloAutomation/MSR-1#93: Both PRs adjust the ESPHome http_request receive buffering for GitHub release-asset redirect responses in the MSR-1 YAMLs.
  • ApolloAutomation/MSR-1#85: Both PRs modify the substitutions.version value in Integrations/ESPHome/Core.yaml.
  • ApolloAutomation/MSR-1#73: Both PRs bump the ESPHome version substitution value in Integrations/ESPHome/Core.yaml.

Suggested reviewers: TrevorSchirmer

Poem

A rabbit hopped through YAML fields so wide,
Found buffers small where headers couldn't hide.
With 5120 bytes, now room to spare,
No more "Out of buffer" errors in the air! 🐰
Version ticked up, one hop more —
Onward to 26.7.8.7! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: increasing the http_request receive buffer to handle GitHub CSP headers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-buffer-size

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bharvey88 bharvey88 merged commit b5a8de4 into beta Jul 8, 2026
10 checks passed
@bharvey88 bharvey88 deleted the fix-buffer-size branch July 8, 2026 21:28
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.

1 participant