Skip to content

Apply http_max_field* limits to response headers in url - #132069

Merged
CheSema merged 1 commit into
masterfrom
url-response-header-limits
Nov 17, 2026
Merged

CheSema merged 1 commit into
masterfrom
url-response-header-limits

Conversation

@CheSema

@CheSema CheSema commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

url and the other readers based on ReadWriteBufferFromHTTP parsed the response header with the Poco defaults: 100 fields, 256-byte names, 8 KiB values. A site with a longer header failed with Malformed message: Field value too long/no CRLF found, for example clickhouse.com with its 9.6 KB Content-Security-Policy. Now these readers use the http_max_fields, http_max_field_name_size and http_max_field_value_size settings, as the Azure client already does. The S3 client has its own limits (128 KiB by default).

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

The url table function and the URL table engine now accept HTTP response headers with fields longer than 8 KiB. The limits come from the http_max_fields, http_max_field_name_size and http_max_field_value_size settings.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/132069]

Version info

  • Merged into: 26.11.1.2560-master (included in 26.11 and later)

`ReadWriteBufferFromHTTP` parsed the response header with the `Poco`
defaults (8 KiB per field value), so `url` failed on sites with a long
header, such as the 9.6 KB `Content-Security-Policy` of clickhouse.com.
@clickhouse-gh

clickhouse-gh Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d0d600b]

Summary: ✅


AI Review

Summary

The PR applies http_max_fields, http_max_field_name_size, and http_max_field_value_size to response headers read by ReadWriteBufferFromHTTP, allowing url and URL reads with header values exceeding the previous 8 KiB limit. No actionable findings. The focused regression test passed in the PR's Fast test job.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Nov 16, 2026
@CheSema
CheSema marked this pull request as ready for review November 16, 2026 16:38

@clickhouse-gh clickhouse-gh Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review approves this commit, see the AI Review comment.

@clickhouse-gh clickhouse-gh Bot added the comp-table-functions Table functions for temporary read/write to external systems (FROM ... tableFunction()). label Nov 16, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing d0d600b56 with master 2a4942ac1 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

1884 translation units recompiled, 15696 s compile time in total, 1884 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×1.05 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost +786.0 s (+5%) in total before that adjustment.

Job report

@CheSema
CheSema added this pull request to the merge queue Nov 17, 2026
@Michicosun Michicosun self-assigned this Nov 17, 2026
Merged via the queue into master with commit 547f4e4 Nov 17, 2026
204 of 379 checks passed
@CheSema
CheSema deleted the url-response-header-limits branch November 17, 2026 10:50
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 17, 2026
@clickhouse-gh clickhouse-gh Bot added comp-networking The connection layer under the protocols, on the server and on the client side: socket read / wri... and removed comp-table-functions Table functions for temporary read/write to external systems (FROM ... tableFunction()). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-networking The connection layer under the protocols, on the server and on the client side: socket read / wri... pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants