-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Stream] STREAM_NOTIFY_COMPLETED over HTTP never emitted #8641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From a quick grep across the PHP-8.1 codebase, |
Thx for your support, |
I've looked through old versions and this was never implemented, so I think this qualifies as a feature request and/or documentation issue. |
Yeah, probably wouldn't make sense to treat it as bug, given it was never implemented, although I wonder why |
Since |
I worked on an implementation of this feature and ran into #10031 as well (the completed event now triggers twice sometimes), so I'm going to spend some time to debug that issue. |
…r emitted This adds support for the completed event. We also have to check for stream->eof in the `stream->readfilters.head` else branch in order to prevent double firing the completed event. The non-else branch already has that check.
…r emitted This adds support for the completed event. Since the read handler could be entered twice towards the end of the stream we remember what the eof flag was before reading so we can emit the completed event when the flag changes to true.
…r emitted This adds support for the completed event. Since the read handler could be entered twice towards the end of the stream we remember what the eof flag was before reading so we can emit the completed event when the flag changes to true.
This adds support for the completed event. Since the read handler could be entered twice towards the end of the stream we remember what the eof flag was before reading so we can emit the completed event when the flag changes to true. Closes GH-10505.
Fixed via GH-10505. |
thanks @nielsdos ! |
Great ! Thx a lot @nielsdos :) |
Description
The following code:
Resulted in this output:
But I expected this output instead:
With the last $notification_code = 8 as "STREAM_NOTIFY_COMPLETED".
Note that the last row has not always $bytes_transferred == $bytes_maximum
Thx :)
PHP Version
PHP 8.1.6
Operating System
Windows 10
The text was updated successfully, but these errors were encountered: