Commit Graph

304 Commits

Author SHA1 Message Date
Christoph M. Becker
48c71cd94b Fix #69487: SAPI may truncate POST data
If SG(request_info).request_body can't be completely written (e.g. due to a
full drive), only parts of the POST data will be available. This patch changes
this, so that SG(request_info).request_body will be reset in this case, and a
warning will be thrown.
2015-08-11 01:32:13 +02:00
Stanislav Malyshev
a1c28567c6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Update header handling to RFC 7230
2015-02-05 20:10:09 -08:00
Stanislav Malyshev
067340bbc8 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update header handling to RFC 7230
2015-02-05 20:09:13 -08:00
Stanislav Malyshev
f001c63073 Update header handling to RFC 7230 2015-02-05 20:08:12 -08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Michael Wallner
438b6c5258 finish 2014-07-03 20:40:40 +02:00
Adam Harvey
82231b5d89 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:40:51 -07:00
Adam Harvey
1b9cbab9a7 Keep 308-399 HTTP response codes when header('Location:') is called.
Fixes bug #67428 (header('Location: foo') will override a 308-399 response
code).
2014-06-12 17:35:05 -07:00
Michael Wallner
7308d47c4b fix bug #67198 (php://input regression) 2014-05-06 12:21:43 +02:00
Ferenc Kovacs
51cbb85ea9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix typo
2014-04-13 01:57:15 +02:00
Ferenc Kovacs
5a0da281e5 fix typo 2014-04-13 01:55:55 +02:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
krakjoe
8a7e2f8dd2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #66375 bad logic in sapi header callback routine
2014-01-01 13:01:06 +00:00
krakjoe
3c3ff43432 fix #66375 bad logic in sapi header callback routine 2014-01-01 12:58:18 +00:00
Anatol Belski
cf6ab0e915 applied and fixed the original patch
initial work on the patch import done
2013-10-17 10:40:43 +02:00
Michael Wallner
423c70fb4d Merge branch 'slim-postdata-merge'
* slim-postdata-merge:
  remove unused code
  tests
  make reading php://input JIT if enable_post_data_reading=0
  revert stream cast
  fix ZTS build
  slim post data

Conflicts:
	ext/soap/soap.c
	ext/standard/php_fopen_wrapper.c
	main/SAPI.c
2013-09-17 13:52:25 +02:00
Michael Wallner
449d4c0b1c make reading php://input JIT if enable_post_data_reading=0 2013-09-10 13:13:33 +02:00
Michael Wallner
bb1f9d3826 slim post data 2013-08-27 13:43:22 +02:00
Michael Wallner
2438490add slim post data 2013-08-27 13:31:35 +02:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Dmitry Stogov
35f86d24d8 Fixed bug #63757 (getenv() produces memory leak with CGI SAPI) 2012-12-13 13:39:42 +04:00
Xinchen Hui
b0f09b69d3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables (without apache2))
2012-04-06 21:57:56 +08:00
Xinchen Hui
9bf8cd4b34 Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables (without apache2)) 2012-04-06 21:42:40 +08:00
Gustavo André dos Santos Lopes
ca58cd01fc Cherry-pick 4cc74767
Headers: forbid \r and \n also after \0, allow CRLF followed by HT or SP and forbid \0. See bug #60227.

Conflicts:

	ext/standard/tests/general_functions/bug60227.phpt
	ext/standard/tests/general_functions/bug60227_1.phpt
	ext/standard/tests/general_functions/bug60227_2.phpt
	main/SAPI.c
2012-04-04 09:59:51 +01:00
Xinchen Hui
f7bf83546e Fix warning "suggest parentheses around assignment" 2012-04-04 16:35:32 +08:00
Xinchen Hui
efd671f242 Fixed bug Fixed bug #61605 (header_remove() does not remove all headers) 2012-04-04 16:14:28 +08:00
Xinchen Hui
896c4539df Fixed bug #61605 (header_remove() does not remove all headers) 2012-04-04 16:01:43 +08:00
Stanislav Malyshev
4cc747677c MFH: Headers: forbid \r and \n also after \0, allow CRLF followed by HT or SP and forbid \0. See bug #60227. 2012-03-07 07:49:56 +00:00
Nikita Popov
09f24e0850 Fix bug #61106 Segfault when using header_register_callback
The callback was double dtored
2012-03-02 08:04:51 +00:00
Gustavo André dos Santos Lopes
8e82bda330 - Merging r323033 into 5.3 (see bug #60227). 2012-02-03 08:48:34 +00:00
Rui Hirokawa
61088ce729 MFH: fixed bug #60227: header() cannot detect the multi-line header with CR. 2012-01-14 07:41:01 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Rui Hirokawa
cc74264764 MFH: fixed bug #60227 (header() cannot detect the multi-line header with CR(0x0D).) 2011-11-10 14:24:31 +00:00
Xinchen Hui
bf2dfb5fff unused var 2011-09-24 01:05:43 +00:00
Xinchen Hui
ea74b9c212 Fixed bug #55758 (Digest Authenticate missed in 5.4)
the block I am removing should be removed along with the PG(saf_mod) condition.
 since it is inside the PG(saf_mod) condition block.
2011-09-23 02:56:25 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Hannes Magnusson
5ddd67d90b Fixed bug#55084 (Function registered by header_register_callback is
called only once per process). (Hannes)

also fixed an issue when header()s are sent from the callback function
2011-07-06 20:38:58 +00:00
Ilia Alshanetsky
34d93f0c06 Zend Signal Handling 2011-06-22 14:23:21 +00:00
Pierre Joye
0778bedbe1 - MFH: make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm) 2011-03-16 23:54:14 +00:00
Pierre Joye
406dd6e8ca - windows only 2011-03-15 17:14:32 +00:00
Pierre Joye
9319359dc9 - make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm) 2011-03-15 17:13:44 +00:00
Pierre Joye
12bdec05a4 - fix regression (carsten_sttgt@gmx.de) 2011-02-25 11:28:33 +00:00
Kalle Sommer Nielsen
c5e86e5a8e Fix ZTS build 2011-02-03 23:57:59 +00:00
Scott MacVicar
ca378eefa0 Add header_register_callback(), allows a userland function
to be called as all the headers are being sent and after all
of the default headers have been merged.

headers_list(), header_remove() and header() can all be used
inside the callback.

<?php

header('Content-Type: text/plain');
header('X-Test: foo');

function foo() {
  foreach (headers_list() as $header) {
    if (strpos($header, 'X-Powered') !== false) {
      header_remove('X-Powered-By');
    }
    header_remove('X-Test');
  }
}

$result = header_register_callback('foo');
echo "a";
2011-02-03 16:47:28 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00