Skip to content

Commit 4a3936e

Browse files
committed
NEWS/UPGRADING{,.INTERNALS} notes about temp POST stream
1 parent 1c15d70 commit 4a3936e

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ PHP NEWS
1111
(Gustavo)
1212
. Uploads equal or greater than 2GB in size are now accepted.
1313
(Ralf Lang, Mike)
14+
. Reduced POST data memory usage by 200-300%. Removed INI setting
15+
always_populate_raw_post_data and the $HTTP_RAW_POST_DATA global
16+
variable. (Mike)
1417

1518
- cURL:
1619
. Implemented FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir

UPGRADING

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,23 @@ PHP X.Y UPGRADE NOTES
2020
1. Backward Incompatible Changes
2121
========================================
2222

23+
- Core:
24+
Removed $HTTP_RAW_POST_DATA global variable. Restore backwards compatibility
25+
by:
26+
<?php
27+
global $HTTP_RAW_POST_DATA;
28+
if (!isset($HTTP_RAW_POST_DATA)) {
29+
$HTTP_ROW_POST_DATA = file_get_contents("php://input");
30+
}
31+
?>
2332

2433
========================================
2534
2. New Features
2635
========================================
2736

37+
- Core:
38+
The php://input stream is now re-usable and can be used concurrently with
39+
enable_post_data_reading=0.
2840

2941
========================================
3042
2. Changes in SAPI modules
@@ -91,6 +103,8 @@ PHP X.Y UPGRADE NOTES
91103
10. Changes to INI File Handling
92104
========================================
93105

106+
- Core:
107+
Removed always_populate_raw_post_data.
94108

95109
========================================
96110
11. Other Changes

UPGRADING.INTERNALS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ UPGRADE NOTES - PHP X.Y
55
1. Internal API changes
66
a. Addition of do_operation and compare object handlers
77
b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros
8+
c. POST data handling
89

910
2. Build system changes
1011
a. Unix build system changes
@@ -57,6 +58,15 @@ UPGRADE NOTES - PHP X.Y
5758
The macros behave similarly to the non-FAST variants with copy=1 and
5859
dtor=0, but will try to return the zval without making a copy by utilizing
5960
return_value_ptr.
61+
62+
c. POST data handling
63+
64+
The sapi_request_info's members post_data, post_data_len and raw_post_data as
65+
well as raw_post_data_len have been replaced with a temp PHP stream
66+
request_body.
67+
68+
The recommended way to access raw POST data is to open and use a php://input
69+
stream wrapper. It is safe to be used concurrently and more than once.
6070

6171
========================
6272
2. Build system changes

0 commit comments

Comments
 (0)