Skip to content

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

Merged
walkor merged 1 commit into
walkor:masterfrom
joanhey:buffer
Jun 2, 2026
Merged

Fix header extraction logic in Http class to account for buffer length#1158
walkor merged 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
@joanhey
Copy link
Copy Markdown
Contributor Author

joanhey commented May 29, 2026

Sorry, but I need this PR merged for the benchmark.
A bench that I don't like but it's the same, the final users only see the results.

@walkor walkor merged commit 5ae2abc into walkor:master Jun 2, 2026
24 checks passed
@joanhey joanhey deleted the buffer branch June 2, 2026 09:09
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