Skip to content

Conversation

@lemenkov
Copy link
Member

@lemenkov lemenkov commented Jan 7, 2026

The old xp_get_content_length() only checked five hardcoded case variants (Content-Length, Content-length, content-Length, content-length, CONTENT-LENGTH), which did not comply with RFC 3261 requiring case-insensitive header matching.

Replace with get_header() which uses strcasestr() for proper case-insensitive search and already handles the compact form "l:".

The old xp_get_content_length() only checked five hardcoded case
variants (Content-Length, Content-length, content-Length,
content-length, CONTENT-LENGTH), which did not comply with RFC 3261
requiring case-insensitive header matching.

Replace with get_header() which uses strcasestr() for proper
case-insensitive search and already handles the compact form "l:".

Signed-off-by: Peter Lemenkov <[email protected]>
Assisted-by: Claude (Anthropic) <https://claude.ai>
@orgads
Copy link
Contributor

orgads commented Jan 7, 2026

Great, thanks!

@orgads orgads merged commit c211398 into SIPp:master Jan 7, 2026
8 checks passed
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