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.
18 years ago
Scott MacVicar
a7dabd575a
MFH: Fixed bug #43954 (Memory leak when sending the same HTTP status code more than once.)
18 years ago
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
18 years ago
Dmitry Stogov
80a7bf2910
Fixed crash because of uninitialized SG(sapi_headers).mimetype
18 years ago
Rasmus Lerdorf
6e0d643783
Slightly cleaner code
19 years ago
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.
19 years ago
Dmitry Stogov
4bd17132b1
ZTS fix
19 years ago
Antony Dovgal
41896020ea
fix ZTS build
19 years ago
Dmitry Stogov
8464abe22e
Fixed crashes because of SAPI handlers overrding from inside of dl()-ed extensions
19 years ago
Dmitry Stogov
e1814f0dbe
WIN64 support
19 years ago
Ilia Alshanetsky
efad70c2cc
snprintf() -> slprintf()
19 years ago
Marcus Boerger
50ea26760d
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
19 years ago
Sebastian Bergmann
4223aa4d5e
MFH: Bump year.
19 years ago
Ilia Alshanetsky
96489b4178
Fixed bug #39984 (redirect response code in header() could be ignored in
19 years ago
Antony Dovgal
b019cd99c6
MFH
19 years ago
Antony Dovgal
908b1e562d
MFH: fix possible invalid read (reproducible only on big-endian machines)
19 years ago
Zeev Suraski
9219d7aa57
Whitespace
19 years ago
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).
20 years ago
Rasmus Lerdorf
4df7ab403c
Add input_filter hook call in getenv()
20 years ago
foobar
5bd93221a8
bump year and license version
20 years ago
foobar
c5b9552891
MFH: typofix
20 years ago
Ilia Alshanetsky
f2415625d4
MFH: Prevent header injection by limiting each header to a single line.
20 years ago
foobar
261eabbdd4
MFH
21 years ago
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 )
21 years ago
Ilia Alshanetsky
435b820f68
Fixed minor memory leak triggered by: -dzlib.output_compression=1 -m
21 years ago
Ilia Alshanetsky
382bc9d0e4
MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset).
21 years ago
foobar
23e671a51e
- Bumber up year
21 years ago
Ilia Alshanetsky
0131b2b032
Fixed double-free in the digest authentication handling.
# Found and Reported by Stefan Esser
21 years ago
Rui Hirokawa
8235a70ef9
added a server variable PHP_AUTH_DIGEST to support HTTP Digest Authentication.
21 years ago
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.
21 years ago
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!
21 years ago
Moriyoshi Koizumi
5e33c04e95
- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
21 years ago
Moriyoshi Koizumi
b19d28907e
- Silly typo.
21 years ago
foobar
498cce1f80
Nuke unused variables when PCRE is not compiled in
21 years ago
foobar
42599f8191
Remove the useless TSRM_FETCH calls
21 years ago
Moriyoshi Koizumi
0d7845384f
- Fix bug #28568 (known_post_content_types is not thread safe).
# What is eventually necessiated is entire SAPI redesign, I think.
21 years ago
Stefan Esser
c02b2d2d45
Fixed: Correctly Initialize fields
22 years ago
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.
22 years ago
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.
22 years ago
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.
22 years ago
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.
22 years ago
Ilia Alshanetsky
b8c9e83664
Fixed bug #28692 (\0 in Authenticate header passed via safe_mode).
22 years ago
Ilia Alshanetsky
ff5b2d27ae
Fixed bug #28670 (WWW-Authentication header mangling with PCRE in safe_mode
adds extra spaces).
22 years ago
Stefan Esser
7dc95709c8
break is better
22 years ago
Marcus Boerger
bca4347064
Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header
22 years ago
Ilia Alshanetsky
09517318b1
Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
disabled).
22 years ago
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
22 years ago
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.
23 years ago
Stefan Esser
28b6c35d80
On error do not leave content_type_dup unitialised.
23 years ago
Ard Biesheuvel
6f37733367
Fixed for 64bit archs
23 years ago