Commit Graph

388 Commits

Author SHA1 Message Date
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
Jani Taskinen
dfb0e70844 - Typos, WS, CS 2010-12-16 12:25:27 +00:00
Gustavo André dos Santos Lopes
6654a4ade5 - Added enable_post_data_reading ini option to allow inhibiting POST data consumption. 2010-12-09 20:35:59 +00:00
Kalle Sommer Nielsen
547691766a Fixed gettimeofday() usage for Ilia's REQUEST_TIME improvement on Windows 2010-11-22 15:43:46 +00:00
Gustavo André dos Santos Lopes
a31f379367 - Reversed implementation of FR #44164, pending further consideration.
See rev #304903.
2010-11-18 04:09:02 +00:00
Ilia Alshanetsky
f89effd2a8 Updated _SERVER['REQUEST_TIME'] to include microsecond precision. 2010-11-06 17:14:21 +00:00
Gustavo André dos Santos Lopes
ee80871a15 - Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
2010-10-27 14:56:51 +00:00
Gustavo André dos Santos Lopes
da400e7500 - Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
2010-10-27 14:56:51 +00:00
Gustavo André dos Santos Lopes
0086bc8a96 - Implemented request #44164, zlib.output_compression is now implicitly
disabled when the header "Content-length" is set.
#One could argue that any output handler could change the size of the
#response, so this exception for zlib.output_compression is an
#inconsistency. However, zlib.output_compression is presented as a
#performance setting, whose value should have no effect on the
#correctness of the scripts. This was not the case. Setting the
#header "content-length" and enabling zlib.output_compression was
#a recipe for infringing section 4.4 of RFC 2616.
2010-10-26 02:16:21 +00:00
Gustavo André dos Santos Lopes
1f191e4d2b - Implemented request #44164, zlib.output_compression is now implicitly
disabled when the header "Content-length" is set.
#One could argue that any output handler could change the size of the
#response, so this exception for zlib.output_compression is an
#inconsistency. However, zlib.output_compression is presented as a
#performance setting, whose value should have no effect on the
#correctness of the scripts. This was not the case. Setting the
#header "content-length" and enabling zlib.output_compression was
#a recipe for infringing section 4.4 of RFC 2616.
2010-10-26 02:16:21 +00:00
Pierre Joye
05383a1072 - drop TSRMLS_FETCH in sapi_register_* (won't bring much at runtime :) ) and cleanup/group the upgrade guide, no need of twenty titles for the same change 2010-09-17 08:41:05 +00:00
Kalle Sommer Nielsen
159cd6916d Fixed compiler warnings in main/ 2010-08-17 12:49:19 +00:00
Dmitry Stogov
f33d2c5fb7 Optimized defaut Content-Type HTTP header processing 2010-07-14 15:20:44 +00:00
Michael Wallner
11d24c1593 * implement new output API, fixing some bugs and implementing some feature
requests--let's see what I can dig out of the bugtracker for NEWS--
  and while crossing the road:
   * implemented new zlib API
   * fixed up ext/tidy (what was "s&" in zend_parse_parameters() supposed to do?)

Thanks to Jani and Felipe for pioneering.
2010-05-31 10:29:43 +00:00
Kalle Sommer Nielsen
dd8e59da8f Removed safe_mode
* Removed ini options, safe_mode*
 * Removed --enable-safe-mode --with-exec-dir configure options on Unix
 * Updated extensions, SAPI's and core
 * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Kalle Sommer Nielsen
6169d91ba7 * Pass TSRMLS_C around pageinfo.c
* Use zend_parse_parameters_none() in pageinfo.c
2010-04-13 11:41:40 +00:00
Andrei Zmievski
f92fae2f66 I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.

Hope all the relevant parties are satisfied.
2010-03-18 22:37:25 +00:00
Andrei Zmievski
3220f15ca2 Fix a few problems with large (2G-4G) file uploads. Added
--enable-large-uploads-fix switch because one change was in SAPI.h structure.
2010-03-18 21:07:38 +00:00
Jani Taskinen
af49e58f51 - Reverted r296062 and r296065 2010-03-12 10:28:59 +00:00
Jani Taskinen
06f072cb5e MFH: Improved / fixed output buffering (Michael Wallner) 2010-03-11 10:24:29 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Jani Taskinen
db53d49623 - Fixed bug #49248 by fixing bug #48994 properly 2009-08-17 17:30:32 +00:00
Jani Taskinen
46bd9ed597 - Try disabling zlib.output_compression always for images. (zlib extension might be compiled as shared and not same time as the main PHP binary) 2009-08-17 16:54:39 +00:00
Jani Taskinen
08f8621a9f - Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when set to a string value)
# also fixes bug #35936 (ini.zlib.output-compression Documentation :)
2009-08-03 18:15:30 +00:00
Stanislav Malyshev
94b7a00760 fix for #47930 2009-04-28 21:30:23 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Arnaud Le Blanc
8c4151ad72 Added header_remove() (chsc at peytz dotdk, Arnaud)
[DOC] proto void header_remove([string header_name])
      Removes an HTTP header previously set using header()
      The header_name parameter is optionnal, all headers are
      removed if it is not set

[SAPIs] The header_handler callback in sapi_module_struct has
           been changed, it now take a new argument.

           When it is set to SAPI_HEADER_DELETE, sapi_header->header is
           the name of an header, header_handler has to delete it.

           When it is set to SAPI_HEADER_DELETE_ALL, header_handler has
           to delete all headers.

           When sapi_header_op_enum is SAPI_HEADER_ADD or _REPLACE,
           sapi_header->header is in the form "Name: value", header_handler
           has to add or replace the given header.

           In all cases, header_handler must not free sapi_header or
           sapi_header->header. SAPI_HEADER_ADD must be returned if the
           header has been added or replaced, or 0 in other cases.
2008-11-13 10:14:04 +00:00
Rasmus Lerdorf
6c158374ba exit_on_timeout patch
After the sigsetjmp change, this is patch #2 in an effort to get some
sanity restored to signal handling in PHP.

This patch does two things.  First, it makes it possible to reset the
timeout without resetting the signal handlers.  This is important for
cases where an extension may have deferred signals in its MINIT in order
to implement critical sections. It also lays the groundwork for cleaning
up our signal handling and perhaps eventually implementing our own
signal deferring mechanism so we can have true critical sections.

The second thing this does is to make it possible to terminate the current
child process (only for Apache1 at the moment) on a timeout.  There are
a number of extensions that are unhappy about being longjmp'ed out of
and when this happens on a timeout they are left in an inconsistent state.
By turning on exit_on_timeout you can now force the process to terminate
on a timeout which will clean up any hanging locks and/or memory left
hanging after the longjmp.
2008-03-18 21:42:50 +00:00
Scott MacVicar
a7dabd575a MFH: Fixed bug #43954 (Memory leak when sending the same HTTP status code more than once.) 2008-01-28 16:09:08 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
80a7bf2910 Fixed crash because of uninitialized SG(sapi_headers).mimetype 2007-12-03 16:04:36 +00:00
Rasmus Lerdorf
6e0d643783 Slightly cleaner code 2007-05-25 09:20:01 +00:00
Rasmus Lerdorf
f6bffb69c5 Optimize sapi_get_request_time() slightly making it use the cached time
and also checking if there is a server_context before trying to call
the request_time sapi hook.
2007-05-25 09:12:35 +00:00
Dmitry Stogov
4bd17132b1 ZTS fix 2007-04-25 14:18:01 +00:00
Antony Dovgal
41896020ea fix ZTS build 2007-04-25 11:05:16 +00:00
Dmitry Stogov
8464abe22e Fixed crashes because of SAPI handlers overrding from inside of dl()-ed extensions 2007-04-25 08:40:07 +00:00
Dmitry Stogov
e1814f0dbe WIN64 support 2007-04-16 08:09:56 +00:00
Ilia Alshanetsky
efad70c2cc snprintf() -> slprintf() 2007-02-27 03:28:17 +00:00
Marcus Boerger
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
96489b4178 Fixed bug #39984 (redirect response code in header() could be ignored in
CGI sapi).
2006-12-31 19:22:01 +00:00
Antony Dovgal
b019cd99c6 MFH 2006-12-21 21:49:22 +00:00
Antony Dovgal
908b1e562d MFH: fix possible invalid read (reproducible only on big-endian machines) 2006-12-18 13:16:54 +00:00
Zeev Suraski
9219d7aa57 Whitespace 2006-12-18 12:32:08 +00:00
Dmitry Stogov
7d14dad02e MFH: Fixed mess with CGI/CLI -d command line option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). 2006-09-19 20:33:12 +00:00
Rasmus Lerdorf
4df7ab403c Add input_filter hook call in getenv() 2006-05-10 21:19:32 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
c5b9552891 MFH: typofix 2005-12-30 05:40:43 +00:00
Ilia Alshanetsky
f2415625d4 MFH: Prevent header injection by limiting each header to a single line. 2005-12-06 03:39:45 +00:00
foobar
261eabbdd4 MFH 2005-11-06 22:08:30 +00:00
Michael Wallner
496fd1c041 - sapi_header_op(SAPI_HEADER_(REPLACE|ADD), {NULL, 0, 0}) caused HTTP response splitting
- sapi_send_headers() already takes care of default_content_type (left over of fix for bug #29983)
2005-11-02 14:38:13 +00:00
Ilia Alshanetsky
435b820f68 Fixed minor memory leak triggered by: -dzlib.output_compression=1 -m 2005-11-01 22:59:18 +00:00
Ilia Alshanetsky
382bc9d0e4 MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset). 2005-10-19 20:33:33 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
0131b2b032 Fixed double-free in the digest authentication handling.
# Found and Reported by Stefan Esser
2005-07-12 16:53:30 +00:00
Rui Hirokawa
8235a70ef9 added a server variable PHP_AUTH_DIGEST to support HTTP Digest Authentication. 2005-04-04 15:06:36 +00:00
Rasmus Lerdorf
3c0411c496 Fix for bug #32263
This adds proto_num to request_info.  It is defaulted to HTTP 1.0 (1000)
such that it has a valid value even if the underlying sapi doesn't set it
correctly.  It is then used to determine if a 302 or a 303 should be sent
on a Location redirect.  Any non GET/HEAD HTTP 1.1 redirect will get a 303
instead of a 302 to be compatible with the HTTP spec.
2005-03-14 19:25:39 +00:00
Andrey Hristov
9e939133d2 FR 32275 - fifth parameter to preg_replace() to count number of replaces
made.
#it would be nice if someone of the doc team documents it. thanks!
2005-03-12 12:03:50 +00:00
Moriyoshi Koizumi
5e33c04e95 - Fixed bug #32109 ($_POST is not populated in multithreaded environment). 2005-03-05 16:41:13 +00:00
Moriyoshi Koizumi
b19d28907e - Silly typo. 2005-02-22 05:07:37 +00:00
foobar
498cce1f80 Nuke unused variables when PCRE is not compiled in 2005-02-21 21:00:04 +00:00
foobar
42599f8191 Remove the useless TSRM_FETCH calls 2005-02-21 20:57:18 +00:00
Moriyoshi Koizumi
0d7845384f - Fix bug #28568 (known_post_content_types is not thread safe).
# What is eventually necessiated is entire SAPI redesign, I think.
2005-02-21 15:14:02 +00:00
Stefan Esser
c02b2d2d45 Fixed: Correctly Initialize fields 2004-11-28 13:32:29 +00:00
Andi Gutmans
216853c0db - Apply realpath() cache patch. We don't use it if we're in safe_mode and
- friends (which are quite slow anyway).
- If it proves to be stable I'll remove the #ifdef's in a few weeks.
2004-10-05 00:42:25 +00:00
Brian France
2f97097e0f If you send a post with a content-type header and then the next post without the content-type header, raw_post_data will not be set. This is because SG(request_info).post_entry is set to the first requests function pointer which makes it follow the wrong code path. 2004-08-19 20:26:39 +00:00
Rasmus Lerdorf
3166314d89 Reset global request_time in sapi_activate. Reset it in sapi_deactivate
too, although I can't see why that would be necessary, but most of the
other sapi globals are reset there as well.
2004-08-11 06:18:25 +00:00
Rasmus Lerdorf
cad60c3760 Add SAPI hook to get the request time if provided by the web server,
otherwise call time(0) on the first call and store it so subsequent
calls will get the same time.  Hook support for Apache1/2 included.
2004-08-10 17:40:00 +00:00
Ilia Alshanetsky
b8c9e83664 Fixed bug #28692 (\0 in Authenticate header passed via safe_mode). 2004-06-08 13:23:38 +00:00
Ilia Alshanetsky
ff5b2d27ae Fixed bug #28670 (WWW-Authentication header mangling with PCRE in safe_mode
adds extra spaces).
2004-06-07 13:51:50 +00:00
Stefan Esser
7dc95709c8 break is better 2004-05-25 22:12:40 +00:00
Marcus Boerger
bca4347064 Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header 2004-03-25 08:42:00 +00:00
Ilia Alshanetsky
09517318b1 Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
disabled).
2004-03-09 02:24:02 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Derick Rethans
750b0338bf - Fix sapi_input_filter patch. Returning 1 from the filter handler should
make PHP register the variable, returning 0 shouldn't. The new length of
  the variables being filtered is now returned in the new_val_len argument
  of the function.
2003-11-29 15:24:35 +00:00
Stefan Esser
28b6c35d80 On error do not leave content_type_dup unitialised. 2003-11-22 21:10:47 +00:00
Ard Biesheuvel
6f37733367 Fixed for 64bit archs 2003-09-13 15:27:09 +00:00
Stefan Roehrich
2fc92e8fd8 Fix for bug #23488 zlib.output_compression overrides vary header.
It was already fixed for ob_gzhandler (#24827).
2003-09-10 08:47:37 +00:00
Sascha Schumann
af8e15b8db kill warnings 2003-08-28 17:07:40 +00:00
Marcus Boerger
c60d2a312e Bugfix #25044 2003-08-11 19:36:26 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Edin Kadribasic
b7713f411e Fix for #23902 by Shane.
Removed bogus recommendation from php.ini files.

# Basic authentication is actually possible
# usign IIS + PHP cgi countrary to our current docs
2003-06-03 10:06:45 +00:00
Rasmus Lerdorf
d08a0e99c8 An input filter might not simply strip stuff, it might also turn things
into entities or use some other mechanism which causes the filtered data
to be longer than the original data.  Ergo, pass in the address of the
buffer instead so the filter is free to reallocate it.
2003-02-20 22:21:49 +00:00
Rasmus Lerdorf
7429c2dc3f Input Filter support. See README.input_filter for details.
@- Input Filter support added. See  README.input_filter. (Rasmus)
2003-02-19 19:41:09 +00:00
Stefan Esser
a0873a8f7d size matters not. 2003-02-11 21:44:02 +00:00
Stefan Esser
d2c550e991 8 + 20 + 1 + 1 = 30
There was no Bufferoverflow on 64bit systems.

And the "fix" broke the header code on systems with old style snprintf.
2003-02-11 21:41:32 +00:00
Moriyoshi Koizumi
6d95ea199d Fixed possible snprintf problem
# besides snprintf returns int value, not uint / size_t...
2003-02-10 20:18:08 +00:00
Moriyoshi Koizumi
9450b1e4b0 Fixed possible buffer overflow in 64bit systems 2003-02-10 20:11:10 +00:00
Moriyoshi Koizumi
9d5811c1f0 Jani happification 2003-02-10 19:45:34 +00:00
Moriyoshi Koizumi
21f766b7a4 Fixed zlib.output_compression so it can work even if zlib extension is built as shared 2003-02-10 19:04:44 +00:00
Sascha Schumann
ba32a619ae use SUCCESS/FAILURE instead of 0/-1 2003-02-09 21:15:55 +00:00
foobar
a09e1397c7 Fixed compile failures when ZLIB / PCRE are compiled as shared
extensions in same build.
2003-02-09 19:09:52 +00:00
Sascha Schumann
294e776d95 add sapi_get_target_uid/_gid for obtaining information about the
non-privileged user the web server is running as.  this is useful
for creating shared memory segments which need to be accessed by
the child processes/threads.
2003-01-21 11:03:58 +00:00
Sascha Schumann
0855c0b603 whitespace 2003-01-15 11:30:39 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Marcus Boerger
8ed84254cd -php_error -> php_error_docref 2002-12-05 21:46:08 +00:00
Sascha Schumann
2b95b3c83b add a "force HTTP/1.0 response" facility to the SAPI layer
this is necessary, when you want to take over control of a connection
and the web server is doing stupid things by default (like enabling
chunked transfer encoding for no reason).
2002-12-01 03:28:21 +00:00
Sascha Schumann
09f463ddae Add sapi_get_fd() and implement it for the Apache/thttpd SAPIs. 2002-11-26 05:15:55 +00:00
Hartmut Holzgraefe
fb5ac5d286 the apache 1.x sapi read_posts tests for SG(read_post_bytes) being
counted up, so lets make it happy although this value is not really
needed in these cases ...
2002-11-21 10:29:11 +00:00
George Schlossnagle
99c7ddc3a8 added support functions for the apache_hooks SAPI 2002-11-18 00:59:23 +00:00
Hartmut Holzgraefe
be5e379ec6 HTTP_RAW_POST_DATA BC fixes
# hopefully all done, commiting anyway to continue work on my home box
php://input stream fixes (POST data handerl mangles data, CLI crashbug)
2002-11-12 18:29:11 +00:00
Hartmut Holzgraefe
5aec6f4e33 fix for #20198:
"always_populate_raw_post_data = On" breaks HTTP file uploads
2002-11-08 08:41:52 +00:00
Hartmut Holzgraefe
07b90cafc9 removed left-over unused variable 2002-10-21 19:18:39 +00:00
Hartmut Holzgraefe
8841dfc995 removed bogus paranoid header checking 2002-10-21 18:44:50 +00:00
Hartmut Holzgraefe
8b7e9d7774 some changes to how request input data (Content-Lenght >0) is handled
- webdav-specific stuff removed (should be handled using httpd.conf
  LIMIT or equivalents)
- always_populate_raw_post_data now working on any method, not just
  POST (and webdav methods with allow_webdav_methods), when
	Content-Length is greater zero
- raw input data is also available using php://input stream,
  this way one doesn't have to care about memory_limit
- input data is now always consumed (although maybe ignored,
  this fixes we had withproblems with keep-alive connections
@ raw POST data is now available as php://input stream (hartmut)
2002-10-21 16:41:06 +00:00
Yasuo Ohgaki
71fb0299d1 Added missing charset. 2002-09-08 01:06:29 +00:00
Hartmut Holzgraefe
431b903e97 WebDAV MKCOL can have post data body, see rfc2518 8.3.1 2002-09-07 17:48:51 +00:00
Stefan Esser
27e2bc2f55 This 2 lines should have been removed when the header() code was rewritten. 2002-09-04 20:27:35 +00:00
Christian Stocker
55f3ec1af4 do not check for POST twice 2002-08-22 07:56:39 +00:00
Christian Stocker
9495fb9d7d @ - Added php.ini option "allow_webdav_methods" to allow handling of
@   WebDAV http requests within PHP scripts. (chregu)
# More methods (for DeltaV) will follow.
2002-08-22 07:48:23 +00:00
Marcus Boerger
abc7041ca2 -keep mimetype until sapi deactivation
-move NULL check for sapi_apply_default_charset to proper position.
2002-08-05 18:32:05 +00:00
Rasmus Lerdorf
c8bf165242 Yup, sizeof() includes the space for the \0 2002-08-03 14:09:56 +00:00
Rui Hirokawa
7527bf0c58 made sapi_register_treat_data() to support multibyte input encoding translation without MBSTR_ENC_TRANS and changed php_treat_data to php_default_treat_data. 2002-08-02 06:53:48 +00:00
Stefan Roehrich
f871a5b742 Fixed wrong usage of strncmp. 2002-08-01 21:12:09 +00:00
Marcus Boerger
be0a6f4949 - free mimetype and statusline early if no longer needed or in deactivation
#not setting them to NULL caused the segfault
2002-08-01 09:00:30 +00:00
Rasmus Lerdorf
7b9036cada Need room for the \0 here to avoid an overflow 2002-08-01 07:49:53 +00:00
Marcus Boerger
4e05dd7c1b -problem with CLI/mbstring/output buffering 2002-07-31 17:55:15 +00:00