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
Stefan Roehrich
6f786ebf3e
Commit patch as discussed on LinuxTag and posted to php-dev in June.
...
Disables zlib.output_compression for scripts with image/ content-type
header (fixes bug #16109 ) and makes it possible to switch
zlib.output_compression during script execution before the headers are
sent.
@- zlib.output_compression is disabled for "image/" content-type
@ headers and can be changed during script execution. (Stefan)
2002-07-28 14:08:08 +00:00
Rui Hirokawa
fbbeaec630
fixed: output encoding translation by mb_output_handler() in ext/mbstring was not usable when Content-Type is set by header().
2002-07-27 13:58:16 +00:00
foobar
c7a68b78a7
- Fixed bug: #18268 . If pcre is build as shared extension, we can't use
...
php_pcre_replace() here.
- Cleaned up a bit.
2002-07-13 00:15:22 +00:00
Sascha Schumann
fee236fb80
fix typo
2002-07-03 10:47:16 +00:00
Sascha Schumann
9c876ea01a
Add sapi_header_op interface which supersedes the sapi_add_header and _ex
...
calls.
Revert the change to the sapi_add_header_ex interface.
Fix various bugs:
1. header("HTTP/1.0 306 foo");
header("Location: absolute-uri");
did not work in combination with several SAPI modules, because
http_status_line was never properly reset. And thus, all SAPI
modules which looked at http_status_line ignored the changed
http_response_code.
2. The CGI SAPI did not send out the HTTP status line at all, if
http_status_line had not been set explicitly by calling
header("HTTP/1.0 200 foo");
2002-07-03 10:42:31 +00:00
Derick Rethans
6869cb3f5a
- Added a new parameter to the header() function which overrides the HTTP
...
response code.
@- Added a new parameter to the header() function which overrides the HTTP
@ response code. (Derick)
2002-06-21 09:31:21 +00:00
Stefan Esser
028b25362b
fix: appending the default charset to text/ content types never worked
...
fix: removed double free
2002-06-18 15:04:58 +00:00
Stefan Esser
28ad564c29
keep fingers away from already freed memory.
2002-06-18 12:57:09 +00:00
Sander Roobol
0c1718c614
Patch by Michael Sisolak <msisolak@yahoo.com> to make header() honor the
...
replace parameter. Closes #16458 .
2002-06-18 10:16:36 +00:00
Stefan Esser
3acaa30c1c
fix for bug #14776
2002-01-14 13:36:54 +00:00
Stefan Esser
a06a627394
fixed: fix for my broken patch.
2001-12-16 23:21:52 +00:00
Stefan Esser
4d2343d7af
whitespace.
2001-12-16 21:47:37 +00:00
Stefan Esser
8022bb9b40
fixed: WWW-Authenticate -> header_line got only freed when safe_mode was activ
...
fixed: WWW-Authenticate -> content of header_line was changed after it was freed
2001-12-16 21:40:20 +00:00
Stefan Esser
b29bcc8618
fixed: bufferoverflow in sapi_add_header_ex triggerable by header("WWW-Authenticate: Basic foobar");
2001-12-16 14:47:18 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
foobar
18f7a8ca61
Added missing CVS Id tag.
2001-11-24 23:38:08 +00:00
Rasmus Lerdorf
db75202426
Let's suppress this warning if always_populate is enabled
2001-10-24 20:10:30 +00:00
Rasmus Lerdorf
42ec547950
Ok, now actually make it work - maybe...
2001-10-23 20:48:30 +00:00
Rasmus Lerdorf
71d341e2c0
@- $HTTP_RAW_POST_DATA was not populated on a missing content-type even when
...
@ always_populate_raw_post_data was on - fixed. (Rasmus)
$HTTP_RAW_POST_DATA was not populated on a missing content-type even when
always_populate_raw_post_data was on - fixed. (Rasmus)
2001-10-23 19:34:29 +00:00
Rasmus Lerdorf
8064e685be
Check if PCRE support is compiled in and only use the pcre functions if
...
it is. Otherwise just set the realm to the safe mode user id if it isn't.
2001-10-21 17:41:15 +00:00
Rasmus Lerdorf
02e25f0a1e
# Butt-ugly looking code here, but I need regular expressions to do this.
...
Re-instated safe-mode realm mangling as it was in php 2 and 3 albeit
in a somewhat more robust way.
@ Re-instated safe-mode realm mangling (Rasmus)
2001-10-20 22:01:56 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
foobar
8d8e26577d
Cleanup.
2001-09-07 00:58:23 +00:00
foobar
e46decaa32
First step for chunkifying the HTTP uploads.
2001-09-03 02:31:56 +00:00
Daniel Beulshausen
0dab84d065
fix SAPI_POST_* exports
2001-08-15 18:01:48 +00:00
Sascha Schumann
8aef193056
more tsrm cleanup
2001-08-05 15:29:47 +00:00
Zeev Suraski
bc42c37513
More TSRMLS_FETCH work. Got it under 400 now.
2001-07-31 06:28:05 +00:00
Zeev Suraski
d76cf1da18
More TSRMLS_FETCH work
2001-07-31 04:53:54 +00:00
Zeev Suraski
d87cc976e1
Redesigned thread safety mechanism - nua nua
2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4
- Get rid of ELS_*(), and use TSRMLS_*() instead.
...
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Zeev Suraski
536a53356d
Get rid of the redundant global startup code
2001-07-24 20:30:37 +00:00
Rasmus Lerdorf
9bc97ac865
Add always_populate_raw_post_data ini directive and default it to 0 to
...
maintain current behaviour. If this is turned on then $HTTP_RAW_POST_DATA
is always populated with a copy of the raw post data.
@ - Add config option (always_populate_raw_post_data) which when enabled
@ will always populate $HTTP_RAW_POST_DATA regardless of the post mime
@ type (Rasmus)
2001-07-17 16:46:07 +00:00
Rasmus Lerdorf
81e2cf03ac
Fix folding and clean up some extensions
2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d
vim-6 does folding - clean up a bunch of missing folding tags plus
...
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Andi Gutmans
4c823e8a89
- Change macros from V_ to VCWD_ because of AIX name clash
2001-04-30 12:45:02 +00:00
Daniel Beulshausen
1b279d3477
get rid of MS's _popen/_pclose
2001-04-27 16:41:53 +00:00
foobar
e76703ae6a
Fix possible crash if content-type is not set.
2001-03-18 08:00:10 +00:00
Zeev Suraski
d3572f74bb
These functions are not necessary - that's what sapi_register_post_entry()
...
and sapi_unregister_post_entry() are for...
Also, please maintain K&R code layout, it's very messy to have different
styles intermixed in the same codebase, and especially in the same files!
2001-03-18 02:32:04 +00:00
Andi Gutmans
eb6ba01d1c
- Fix copyright notices with 2001
2001-02-26 06:11:02 +00:00
Zeev Suraski
bd0ac7fe14
Many patches. I hope I remember them all:
...
- Make sapi_module available to external modules (PHPAPI)
- Make the php.ini path reported in phpinfo() always point to
real full path of the php.ini file
- Optimized the ISAPI module not to read unnecessary server
variables and read necessary variables at most once.
2001-01-02 22:49:31 +00:00
Jason Greene
d8bc7084ee
Added the capability to specify a different HTTP Redirection response code
...
before the Location Header.
Ex. header("HTTP/1.1 307 Temporary Redirect");
header("Location: URL");
2000-11-29 01:22:49 +00:00
Zeev Suraski
0f7f5c2c0e
- Import Jade Nicoletti's transparent gzip encoding support as an output
...
handler. Works quite nicely!
- Fix buglets in output buffering
- Add output_handler INI directive
2000-11-13 18:54:37 +00:00
Sascha Schumann
2b060b3bf3
Add sapi_add_header_ex, which lets you specify whether you want
...
to add or replace a header.
2000-10-26 18:18:21 +00:00
Frank M. Kromann
222d004714
Changing datatype to remove compiler warning
2000-10-20 19:10:27 +00:00
Hartmut Holzgraefe
545ae277bc
post handler registration done right
...
(never use emalloc in an extension MINIT function)
2000-10-13 12:13:35 +00:00
Hartmut Holzgraefe
22e48a814a
@ - POST handler for Adobe FDF format (Hartmut)
...
the FDF handler is now working and totaly living
in the fdf extension, no more special code in
main is needed
2000-10-11 22:44:15 +00:00
Zeev Suraski
b7ecaacd07
More security-related (control) patches:
...
- Avoid displaying errors during startup, unless display_startup_errors is enabled.
- Implemented post_size_max limit. Defaults to 8MB.
- Implemented file_uploads on/off directive (defaults to on).
2000-09-09 15:02:15 +00:00
Zeev Suraski
6c4cb4c079
Security related updates:
...
- Introduce php_open_temporary_file(), in place of tempnam(). Still
needs testing under UNIX (mkstemp()), works reliably under Windows now.
- Reimplement the mechanism for unlinking uploaded files at the end of the request
(was it ever tested?). Files moved with move_uploaded_file() will not be unlink()'d
again, to avoid (albeit very unlikely) race conditions.
2000-09-09 11:41:14 +00:00
Zeev Suraski
3edf46ff73
Implement move_uploaded_file() (untested)
2000-09-08 22:31:21 +00:00
Zeev Suraski
75086e3088
- Implemented is_upload_file()
2000-09-08 21:56:47 +00:00
Zeev Suraski
91c808ecc4
Restore the headers_only test to the centralized SAPI startup. If necessary, it can
...
be overriden in the activate() callback.
2000-09-08 14:43:57 +00:00
Andi Gutmans
6bfed632c7
- This shouldn't have been commited.
...
There are quite a few modules which are using VIRTUAL_DIR. I don't think
this should be happening.
2000-09-04 04:22:47 +00:00
Andi Gutmans
341a0d465a
- Found my bug and managed to move the V_* macros to TSRM
2000-09-04 04:18:04 +00:00
Sascha Schumann
35a9a1878e
Fix strlcpy use at this place.
2000-08-27 09:48:03 +00:00
Sascha Schumann
b2cecd9d8b
newtype has a length of newlen+1, 'len' refers to the length of *mimetype
...
here.
2000-08-27 09:32:23 +00:00
Sascha Schumann
320105bcd8
Use size_t as parameter type in the getenv member of struct sapi_module
2000-08-20 14:20:21 +00:00
Zeev Suraski
f112b68668
Avoid an endless loop situation in case of an error situation while sending headers
2000-08-19 16:38:19 +00:00
Rasmus Lerdorf
ff0a08f508
Leave this initialization in
2000-08-02 22:53:55 +00:00
Rasmus Lerdorf
76a2d2538c
Heads up! I have moved the headers_only and response_code checks out of
...
SAPI and down into the individual SAPI modules. I have made the
appropriate changes in all the SAPI modules, but please verify these.
The reason for this change is that Apache sometimes will feed PHP
a request_method of GET but have r->header_only set to true. This happens
in an ErrorDocument redirect. In this same scenario we want to preserve
the status code as well instead of just overwriting it with a 200 and
losing this information. For now the other sapi modules act exactly as
before since they probably do not make this distinction, and they may
not even have a valid response code this early in the request.
@ Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
@ the status code across the redirect as well. (Rasmus)
2000-08-02 22:48:45 +00:00
Zeev Suraski
168ccfc133
Disable the hash_apply() protection on hashes that persist across requests - it's unsafe
...
because we may be aborted at any point
@- Fixed a possible data corruption in case of a huge amount of aborted requests (Zeev)
2000-07-11 14:29:38 +00:00
Uwe Steinmann
68f35d5539
- fixed handling of fdf data (application/vnd.fdf)
2000-07-05 08:57:37 +00:00
Rasmus Lerdorf
2b61d55b1d
This is documented to not be case sensitive and it is not case sensitive
...
in PHP 3, so let's not make it case sensitive.
@Make the special Header("http/...") response be case insensitive like 3.0 (Rasmus)
2000-07-01 18:06:11 +00:00
Andi Gutmans
d8a75cf7e5
- COMPILE_ERROR should only be used in Zend
2000-06-23 13:05:06 +00:00
Zeev Suraski
e043439ff6
Update the license with the new clause 6
2000-05-18 15:34:45 +00:00
Hartmut Holzgraefe
5c5ccc9844
no more broken scripts by erroneously terminating header()'s argument
...
with a CR-LF
2000-04-28 16:47:19 +00:00
Zeev Suraski
3220bb570e
- Fix an invalid trick (it was valid when header() was using
...
zend_get_parameters(), but it became invalid when someone switched it
to zend_get_parameters_ex(), and I decided to remove it anyway).
- Remove a redundant function call
2000-04-28 13:03:13 +00:00
Andi Gutmans
e40268d07c
- Add missing V_STAT()
2000-04-20 16:38:08 +00:00
Andi Gutmans
de0d354736
- Create dtor function
2000-04-02 20:26:06 +00:00
Andi Gutmans
6a2da70f94
- Virtual cwd compiles now (need to uncomment #define in php.h for it to
...
be enbaled right now).
It seems to work very basic stuff
2000-04-02 19:04:59 +00:00
Zeev Suraski
53586378b0
@- Fix a problem when dealing with large POST blocks in CGI mode
2000-04-01 01:11:39 +00:00
Sascha Schumann
f72bcaa648
kill warning
2000-03-30 17:55:50 +00:00
Andi Gutmans
1bcdb436c1
- Note quite sure why this wasn't done.
2000-03-16 21:23:24 +00:00
Sam Ruby
64df92e053
Fix traps due to sapi_global not being initialized when ZTS is set
...
Don't trap if php.ini can't be read
2000-03-05 21:37:47 +00:00
Zeev Suraski
88b31ecb28
@- The string None is now recognized as a keyword by the php.ini processor, and
...
@ can be used to denote an empty string (Zeev)
- Added None keyword support to the INI parser
- Removed specialized "none" code
2000-02-26 14:29:27 +00:00
Thies C. Arntzen
ae08e0500e
(sapi_send_headers) fix leak
2000-02-26 14:21:10 +00:00
Zeev Suraski
a508bec819
- From CODING_STANDARDS:
...
[6] NEVER USE strncat(). If you're absolutely sure you know what you're doing,
check its man page again, and only then, consider using it, and even then,
try avoiding it.
strncat() is your enemy!
- Fix several SAPI services, get rid of the default_content_type (it's always
composed of the mime type and charset now).
- Win32 works again
2000-02-26 05:03:41 +00:00
Sam Ruby
937db8cc80
Build failure on Win32:
...
error C2198: 'sapi_apply_default_charset' : too few actual parameters
2000-02-25 23:12:51 +00:00
Stig Bakken
d23e5d837a
@- Implemented default_charset and default_mimetype config directives (Stig)
...
Implemented default_charset and default_mimetype configuration directives.
Started implementing ticks in PHP.
2000-02-25 21:27:03 +00:00
Thies C. Arntzen
83d20ab305
fix obvious crash.
...
stig, in sgi-mode i still "only" get:
(haven't touched my .ini file in ages - and don't plan to)
X-Powered-By: PHP/4.0b5-dev
Content-type: iso-8859-1 <<< where is text/html?
2000-02-25 10:10:43 +00:00
Stig Bakken
ba03c9f2aa
started implementing directives for default mimetype/charset
2000-02-24 22:00:47 +00:00
Zeev Suraski
9b621d1c8f
Get the license right... (this won't make it to RC1 of B4)
2000-02-19 23:21:46 +00:00
Zeev Suraski
ae22fe4c52
- Update .dsp's
...
- Fix a possible crash bug in failed file open error message
- Fix SAPI initialization issue that could lead to a crash
2000-02-18 01:52:11 +00:00
Zeev Suraski
4549b969f9
Fix duplicate freeing
2000-02-17 20:46:13 +00:00
Zeev Suraski
a6393de6f7
Make POST handling the way it should be. RFC1867, and any future POST handlers we might
...
have in the future now obey to the variables_order directive, and there's a real way modular
way to handle POST content.
This is all untested, BEFORE_SAPI_POST_PATCH_17_FEB_2000 tagged before submission
@- Made multipart/form-data content obey to the variables_order directive (Zeev)
2000-02-17 20:23:59 +00:00
Zeev Suraski
a5c143f415
- Update .dsp's
...
- Fix auth_user issue
2000-02-16 16:46:01 +00:00
Zeev Suraski
e9dcdb8f97
@- Improved ISAPI module - it should no longer be necessary to set PHP as
...
@ an ISAPI filter, only as an ISAPI extension, unless you wish to perform
@ authentication using PHP. This didn't yet get enough testing, but it
@ should work (Zeev)
- Fixed auth_user/auth_password memory leak (I didn't have time to test it under
Apache, feedback welcome!)
2000-02-15 23:31:10 +00:00
Zeev Suraski
80bdd19e03
Fine tune Andi's patch
2000-02-11 15:59:30 +00:00
Zeev Suraski
49e98c3ddd
request_info.c is dead! long live SAPI
...
@- Finished the server abstraction layer; All of the PHP code is now shared
@ across different servers (Apache, CGI, IIS, etc.), except for thin
@ interface modules (Zeev)
2000-02-10 20:13:08 +00:00
Zeev Suraski
9709f7ec73
The last patch wasn't that good, fix
2000-02-10 19:29:21 +00:00
Zeev Suraski
25b5cb9599
More protection...
2000-02-10 19:28:05 +00:00
Zeev Suraski
42765d50e0
Only activate if we're inside an actual request
2000-02-10 19:22:36 +00:00
Zeev Suraski
41f6bca92f
More cleanup!
2000-02-10 18:19:04 +00:00
Zeev Suraski
0fd89aa20d
More cleanup - move getenv() to SAPI
2000-02-10 17:55:01 +00:00
Zeev Suraski
7d926a0e0c
More cleanup...
2000-02-10 17:26:57 +00:00
Andi Gutmans
f452c7762f
- Introduce PHP_WIN32
2000-02-10 17:14:05 +00:00
Zeev Suraski
073b148167
More abstraction
2000-02-10 16:44:59 +00:00
Zeev Suraski
8055da9830
Use the new state functions
...
@- If header information is sent after output has already been sent, the warning
@ message will now state the filename and line number at which the first output
@ was made (Zeev)
2000-02-04 14:54:30 +00:00
Zeev Suraski
972631be71
- Added flush() support to SAPI
...
- Got rid of the old flush() implemenetation in favour of the new one
- Added implicit_flush() support to the output buffering layer.
@- Added implicit_flush() to control whether flush() should be called
@ implicitly after any output (Zeev)
2000-01-13 17:37:25 +00:00
Sascha Schumann
304d60c8f3
Move reentrancy initialisation/destruction into SAPI.
...
These calls only do something, if reentrancy emulation is required.
2000-01-05 19:25:19 +00:00
Sascha Schumann
43ae2bffbb
Happy Y2K patch! Happy new year (or the new millennium, depending on whether
...
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Evan Klinger
497b3fe2c5
Fix for #2994
1999-12-19 02:04:20 +00:00
Sascha Schumann
e08b2e7b0f
Export sapi_free_header()
1999-12-10 12:38:20 +00:00
Sam Ruby
8abf724678
Provide basis for shared libraries/dlls to contain internal extensions
1999-12-07 20:49:01 +00:00
Sascha Schumann
4a60eed469
Fix some warnings
1999-12-05 16:25:32 +00:00
Uwe Steinmann
8c473e1f47
- support for mimetype application/vnd.fdf needed by fdf module
...
(only active if fdf support is compiled in)
1999-10-06 05:26:25 +00:00
Sascha Schumann
c36bff57ca
Fix logic.
1999-10-05 12:06:35 +00:00
Sascha Schumann
7aed3d51fc
* Fix header("HTTP/..") behaviour
...
* Fix leak WRT http_status_line
* Update sapi/README
* Remove %PHP_OUTPUT_FILES sort
1999-10-04 18:07:46 +00:00
Zeev Suraski
98d95dd88e
- Added support for unknown POST content types (Zeev)
...
- Introduce the convert_to_*_ex() API in strlen()
1999-09-16 23:18:15 +00:00
Thies C. Arntzen
ac1a484c84
i'm sure this was left-over debugging code!
1999-09-14 13:32:54 +00:00
Andi Gutmans
14d9a59f1c
- Make dir functions compile in Win32
...
- Fix too early memory manager initialization (For you Thies)
1999-09-05 19:04:40 +00:00
Sascha Schumann
5b293ecd4d
- add global startup/shutdown handlers
...
- improve genif.sh to also consider all header files for inclusion
(checks for phpext_)
- use vsnprintf in main.c to avoid buffer overflows
- improve sessions's mm module to cope better with OOM situations
within the shared memory segment
- fix typo wrt session.auto_start
1999-09-03 17:46:39 +00:00
Andi Gutmans
3516ee485a
Fix HTTP/ header handling
1999-08-09 17:40:28 +00:00
Zeev Suraski
c5724cbd14
License update
1999-07-16 13:13:16 +00:00
Zeev Suraski
96bfbc7904
First attempt at moving the old RFC1867 support to the right place
1999-06-12 17:50:39 +00:00
Sascha Schumann
6ebb2c80e0
kill warning
1999-05-29 16:20:55 +00:00