php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80124 HTTP stream contexts missing upload progress notification
Submitted: 2020-09-19 22:50 UTC Modified: 2020-09-20 00:24 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: jcarson88 at gmail dot com Assigned:
Status: Open Package: Streams related
PHP Version: 7.2.33 OS: CentOS Linux release 7.8.2003
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jcarson88 at gmail dot com
New email:
PHP Version: OS:

 

 [2020-09-19 22:50 UTC] 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.


Patches

lxbfYeaa (last revision 2024-04-15 19:05 UTC by testing at example dot com)
LmMqtzme (last revision 2024-04-11 21:25 UTC by testing at example dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-19 23:38 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2020-09-19 23:38 UTC] requinix@php.net
I'm probably missing something, but why would file_*get*_contents have *upload* progress?
 [2020-09-19 23:53 UTC] jcarson88 at gmail dot com
-Status: Feedback +Status: Open
 [2020-09-19 23:53 UTC] 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:57 UTC] requinix@php.net
-Summary: file_get_contents missing upload notification +Summary: HTTP stream missing upload notification
 [2020-09-19 23:57 UTC] requinix@php.net
Oh, so it's not about file_get_contents itself but about HTTP streams with a context that includes data to send.
 [2020-09-20 00:21 UTC] requinix@php.net
-Summary: HTTP stream missing upload notification +Summary: HTTP stream contexts missing upload progress notification
 [2020-09-20 00:24 UTC] jcarson88 at gmail dot com
Yes, that is correct.
 [2023-01-12 05:08 UTC] samira dot akhlaqi314 at gmail dot com
A really good post, very thankful and hopeful that you will write many more posts like this one.		

(https://www.livetheorangelife.net/)php.net
 [2024-04-11 21:25 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: LmMqtzme
Revision:   1712870737
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=LmMqtzme&revision=1712870737
 [2024-04-11 21:25 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: LmMqtzme
Revision:   1712870749
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=LmMqtzme&revision=1712870749
 [2024-04-11 21:25 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: LmMqtzme
Revision:   1712870751
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=LmMqtzme&revision=1712870751
 [2024-04-15 19:04 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: lxbfYeaa
Revision:   1713207899
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=lxbfYeaa&revision=1713207899
 [2024-04-15 19:05 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: lxbfYeaa
Revision:   1713207902
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=lxbfYeaa&revision=1713207902
 [2024-04-15 19:05 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: lxbfYeaa
Revision:   1713207908
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=lxbfYeaa&revision=1713207908
 [2024-04-15 19:05 UTC] testing at example dot com
The following patch has been added/updated:

Patch Name: lxbfYeaa
Revision:   1713207914
URL:        https://bugs.php.net/patch-display.php?bug=80124&patch=lxbfYeaa&revision=1713207914
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 11:01:28 2024 UTC