Skip to content

streams: php_stream_copy_to_stream_ex() drops progress notifications. - #22863

Closed
devnexen wants to merge 3 commits into
php:masterfrom
devnexen:gh22841
Closed

streams: php_stream_copy_to_stream_ex() drops progress notifications.#22863
devnexen wants to merge 3 commits into
php:masterfrom
devnexen:gh22841

Conversation

@devnexen

Copy link
Copy Markdown
Member

Fix #22841

The fd-level copy fast path hands the transfer to the kernel, so the bytes bypassed php_sockop_read() and neither the progress increments nor the completion event were emitted. Skip the fast path when either stream carries a context notifier.

devnexen added 2 commits July 22, 2026 19:59
Fix php#22841

The fd-level copy fast path hands the transfer to the kernel, so the
bytes bypassed php_sockop_read() and neither the progress increments nor
the completion event were emitted. Skip the fast path when either stream
carries a context notifier.
@devnexen
devnexen marked this pull request as ready for review July 22, 2026 20:23
@devnexen
devnexen requested a review from bukka as a code owner July 22, 2026 20:23
Comment thread main/streams/streams.c Outdated
}


static bool php_stream_copy_context(php_stream *stream)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't this be better named php_stream_has_notifier()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sure I do not mind changing

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me!

@devnexen devnexen closed this in 1da60a2 Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP 8.6 IO Copy API breaks STREAM_NOTIFY_PROGRESS and STREAM_NOTIFY_COMPLETED

3 participants