Req #80124 [Opn]: HTTP stream missing upload notification

From: Date: Sat, 19 Sep 2020 23:58:00 +0000
Subject: Req #80124 [Opn]: HTTP stream missing upload notification
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229088@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80124&edit=1

 ID:                 80124
 Updated by:         requinix@php.net
 Reported by:        jcarson88 at gmail dot com
-Summary:            file_get_contents missing upload notification
+Summary:            HTTP stream missing upload notification
 Status:             Open
 Type:               Feature/Change Request
 Package:            Streams related
 Operating System:   CentOS Linux release 7.8.2003
 PHP Version:        7.2.33
 Block user comment: N
 Private report:     N

 New Comment:

Oh, so it's not about file_get_contents itself but about HTTP streams with a context that
includes data to send.


Previous Comments:
------------------------------------------------------------------------
[2020-09-19 23:53:04] jcarson88 at gmail dot com

When using file_get_contents, the HTTP Request data is written to the socket first before the stream
notify hooks will begin to fire. I believe this to be true with other streaming functions as well.
There are currently no stream notify hooks to capture upload progress when performing a POST.
I've never seen an instance of file_put_contents used to POST data, which I believe you are
alluding to, and I believe it would be prone to the same issue.

------------------------------------------------------------------------
[2020-09-19 23:38:12] requinix@php.net

I'm probably missing something, but why would file_*get*_contents have *upload* progress?

------------------------------------------------------------------------
[2020-09-19 22:50:42] jcarson88 at gmail dot com

Description:
------------
Currently, file_get_contents supports download progress feedback via the notification hook
STREAM_NOTIFY_PROGRESS. However, file_get_contents does not support upload progress hooks to provide
feedback to the system or user when performing an HTTP POST using a large data set.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80124&edit=1


Thread (7 messages)

« previous php.bugs (#229088) next »