Skip to content

Fix header extraction logic in Http class to account for buffer length#1158

Open
joanhey wants to merge 1 commit into
walkor:masterfrom
joanhey:buffer
Open

Fix header extraction logic in Http class to account for buffer length#1158
joanhey wants to merge 1 commit into
walkor:masterfrom
joanhey:buffer

Conversation

@joanhey
Copy link
Copy Markdown
Contributor

@joanhey joanhey commented May 7, 2026

Before always return the substr(), even when it's the end of the buffer.

Before:
$header = isset($buffer[$length]) ? substr($buffer, 0, $length) : $buffer;

Now:
$header = isset($buffer[$length + 1]) ? substr($buffer, 0, $length) : $buffer;

@joanhey joanhey marked this pull request as draft May 7, 2026 19:22
@joanhey joanhey marked this pull request as ready for review May 7, 2026 19:26
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