Weilin Du
25687441a3
ext/standard: add test triggering deprecation when reading $http_response_header via a dynamic fetch
...
And thus remove the TODO message in zend_compile.c.
2026-04-06 18:21:50 +01:00
Ilija Tovilo
48e318f581
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Tweak stack limit values for gh20840.phpt
Tweak stack limit values for gh20583.phpt
2026-02-24 02:11:44 +01:00
Ilija Tovilo
9a6a841d77
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Tweak stack limit values for gh20583.phpt
2026-02-24 02:11:09 +01:00
Ilija Tovilo
3692a5fa57
Tweak stack limit values for gh20583.phpt
...
Graciously tested by Andy Postnikov (andypost).
See GH-21086
Closes GH-21274
2026-02-24 02:10:47 +01:00
Niels Dossche
f622c3925b
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Tweak values for test on Windows (#20633 )
2025-12-02 20:48:44 +01:00
Niels Dossche
881754ec1e
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Tweak values for test on Windows (#20633 )
2025-12-02 20:48:36 +01:00
Niels Dossche
ad867ce651
Tweak values for test on Windows ( #20633 )
2025-12-02 20:48:24 +01:00
Niels Dossche
1279bc60e7
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Fix GH-20584: Information Leak of Memory
Fix GH-20583: Stack overflow in http_build_query via deep structures
2025-11-28 18:39:50 +01:00
Niels Dossche
159a75c93c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-20584: Information Leak of Memory
Fix GH-20583: Stack overflow in http_build_query via deep structures
2025-11-28 18:39:27 +01:00
Niels Dossche
292a7f73ba
Fix GH-20583: Stack overflow in http_build_query via deep structures
...
Closes GH-20590.
2025-11-28 18:38:18 +01:00
Gina Peter Banyard
9794f483d4
ext/standard: Fix GH-19610 (Deprecation warnings in functions taking as argument) ( #19611 )
2025-08-28 11:48:41 +01:00
Gina Peter Banyard
8a5972fd83
ext/standard: Deprecate $http_response_header ( #19464 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable
2025-08-25 22:43:26 +01:00
Gina Peter Banyard
f47a7e8056
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
tests: Fix expectations
2025-05-31 14:46:13 +01:00
Gina Peter Banyard
7f2299c8eb
tests: Fix expectations
...
Closes GH-18712
2025-05-31 14:45:41 +01:00
Niels Dossche
7a2bef02c0
Fix GH-18400: http_build_query type error is inaccurate
...
Objects are also accepted still, so the error message is misleading.
Closes GH-18434.
2025-04-26 14:17:24 +02:00
Niels Dossche
8156a89eff
Fix incorrectly merged bug75535.phpt
...
Co-authored-by: Jakub Zelenka <bukka@php.net >
2025-03-11 23:06:28 +01:00
Jakub Zelenka
6976fb6ba7
Merge branch 'PHP-8.3' into PHP-8.4
2025-03-11 22:23:09 +01:00
Jakub Zelenka
acf2f4988a
Merge branch 'PHP-8.2' into PHP-8.3
2025-03-11 22:09:00 +01:00
Jakub Zelenka
4af1830356
Merge branch 'PHP-8.1' into PHP-8.2
2025-03-11 21:57:33 +01:00
Jakub Zelenka
41d49abbd9
Fix GHSA-hgf5-96fm-v528: http user header check of crlf
2025-03-11 21:50:16 +01:00
Jakub Zelenka
ac1a054bb3
Fix GHSA-52jp-hrpf-2jff: http redirect location truncation
...
It converts the allocation of location to be on heap instead of stack
and errors if the location length is greater than 8086 bytes.
2025-03-11 21:50:16 +01:00
Jakub Zelenka
0548c4c175
Fix GHSA-pcmh-g36c-qc44: http headers without colon
...
The header line must contain colon otherwise it is invalid and it needs
to fail.
Reviewed-by: Tim Düsterhus <tim@tideways-gmbh.com >
2025-03-11 21:50:16 +01:00
Jakub Zelenka
d20b4c97a9
Fix GHSA-ghsa-v8xr-gpvj-cx9g: http header folding
...
This adds HTTP header folding support for HTTP wrapper response
headers.
Reviewed-by: Tim Düsterhus <tim@tideways-gmbh.com >
2025-03-11 21:50:16 +01:00
Jakub Zelenka
35c03c165e
Merge branch 'PHP-8.3' into PHP-8.4
2025-01-06 12:20:50 +01:00
Jakub Zelenka
5b72f12c56
Rewrite http gh16810 test to not be online
...
Closes GH-17314
2025-01-06 12:20:13 +01:00
David Carlier
fc3ac345d7
Merge branch 'PHP-8.3' into PHP-8.4
2024-12-08 20:30:16 +00:00
David Carlier
301b8e24c1
Fix GH-16809: fopen HTTP wrapper timeout stream context option overflow.
...
close GH-16810
2024-12-08 20:29:57 +00:00
Jakub Zelenka
7c96af42b7
Merge branch 'PHP-8.3' into PHP-8.4
2024-11-20 11:14:04 +01:00
Jakub Zelenka
ffff27f734
Merge branch 'PHP-8.2' into PHP-8.3
2024-11-20 11:12:19 +01:00
Jakub Zelenka
d7fe40868e
Fix GHSA-c5f2-jwm7-mmq2: stream HTTP fulluri CRLF injection
2024-11-20 11:06:02 +01:00
Jakub Zelenka
426a6d4539
Fix GHSA-c5f2-jwm7-mmq2: stream HTTP fulluri CRLF injection
2024-11-17 19:29:45 +01:00
Ilija Tovilo
1b9568d354
Implement backed enum coercion in http_build_query()
...
Fixes GH-15650
Closes GH-15704
2024-09-19 00:27:09 +02:00
Gina Peter Banyard
c6e1e307a3
ext/standard: Throw a RequestParseBodyException instead of InvalidArgumentException ( #15468 )
...
Especially as this exception is thrown when there isn't an issue with an argument
2024-08-18 18:21:25 +01:00
Niels Dossche
af830d866f
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:03:06 +02:00
Niels Dossche
c26d1a36e2
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:02:47 +02:00
Niels Dossche
cfcc2a3fda
Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
...
We were using atoi, which is only for integers. When the size does not
fit in an integer this breaks. Use ZEND_STRTOUL instead. Also make sure
invalid data isn't accidentally parsed into a file size.
Closes GH-15035.
2024-07-21 22:02:11 +02:00
Niels Dossche
f58a3c392f
Fix references in request_parse_body() options array
...
Otherwise we get funny messages like
"Invalid string value in $options argument".
Closes GH-14977.
2024-07-16 20:07:59 +02:00
Gina Peter Banyard
47a199c8b4
Add http_(get|clear)_last_reponse_headers() functions ( #12500 )
...
This is to provide an alternative to the $http_response_header magic variable
RFC: https://wiki.php.net/rfc/http-last-response-headers
2024-02-29 16:41:09 +00:00
Ilija Tovilo
59211a51b7
[skip ci] Move RFC1867 tests as requested by Jakub
2024-02-09 16:01:14 +01:00
Gina Peter Banyard
4c6e08dd09
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Mention correct bug number
2023-11-22 04:15:07 +00:00
Gina Peter Banyard
af155cf2dc
Mention correct bug number
...
I'm tired
2023-11-22 04:14:37 +00:00
Gina Peter Banyard
e5b3e37684
Merge branch 'PHP-8.3'
...
* PHP-8.3:
ext/standard: Fix GH-9316
2023-11-22 04:10:39 +00:00
Gina Peter Banyard
37f67a9a98
ext/standard: Fix GH-9316
...
http_build_query() default null argument for is implicitly coerced to string
Closes GH-9316
2023-11-22 04:09:40 +00:00
Ilija Tovilo
f39b5c4c25
Close PHP tags in tests
...
Closes GH-12422
2023-10-18 17:34:10 +02:00
Niels Dossche
d22d0e26dc
Implement GH-8641: STREAM_NOTIFY_COMPLETED over HTTP never 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.
Closes GH-10505.
2023-06-10 19:47:36 +02:00
Niels Dossche
afcf97b2a4
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix GH-11274: POST/PATCH request via file_get_contents + stream_context_create switches to GET after a HTTP 308 redirect
2023-05-19 23:46:47 +02:00
Niels Dossche
1ede3137c9
Fix GH-11274: POST/PATCH request via file_get_contents + stream_context_create switches to GET after a HTTP 308 redirect
...
RFC 7231 states that status code 307 should keep the POST method upon
redirect. RFC 7538 does the same for code 308. Although it's not
mandated by the RFCs that PATCH is also kept (we can choose), it seems
like keeping PATCH will be the most consistent and understandable behaviour.
This patch also changes an existing test because it was testing for the
wrong behaviour.
Closes GH-11275.
2023-05-19 23:37:20 +02:00
George Peter Banyard
ec7c7a7550
Add more tests for http_build_query()
...
Some with unusual types like resource and null
A lot more tests for objects
2023-01-15 16:00:17 +00:00
George Peter Banyard
c177ea91d4
Move http_build_query() tests to the HTTP test folder
2023-01-15 16:00:17 +00:00
Christoph M. Becker
5d196d9e7c
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-9316: $http_response_header is wrong for long status line
2022-08-18 12:30:45 +02:00