Commit Graph

83 Commits

Author SHA1 Message Date
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
Zeev Suraski
5af649efbd Revert to the old php_ini.c, and reimplement the binary-path searching.
Should now also work under UNIX (CLI/CGI)
2002-05-11 03:41:17 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Edin Kadribasic
1788410a56 Added argc and argv in request_info needed for the new cli sapi.
Modified registering $argc and $argv to support cli sapi.
2002-01-06 13:58:05 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
foobar
8d8e26577d Cleanup. 2001-09-07 00:58:23 +00:00
Daniel Beulshausen
0dab84d065 fix SAPI_POST_* exports 2001-08-15 18:01:48 +00:00
Zeev Suraski
2cf25894a8 improve typedef definition 2001-08-14 22:57:09 +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
Stig Bakken
0b2641efa6 @Added -C command-line option to avoid chdir to the script's directory (Stig) 2001-04-16 23:20:47 +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
60776dbeeb Fix Apache module and remove excess elements from the SAPI structure 2001-01-03 11:56:00 +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
Sascha Schumann
dcd971e6bf A field of mines
Submitted by: jon@csh.rit.edu
2000-11-28 06:54:16 +00:00
Sascha Schumann
3b195720e0 Add a note about what a missing const specifier does mean in the context
of the request_info structure.
2000-11-27 13:33:33 +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
Daniel Beulshausen
87d8e44c26 win32 sapi symbol export fixes 2000-11-07 21:13:26 +00:00
Zeev Suraski
50e0d9d34b cookie_data may also be modified... 2000-11-07 18:12:06 +00:00
Sascha Schumann
43ff395b65 Const'ify part of sapi_request_info.
query_string, post_data, path_translated, request_uri, auth_user,
auth_password and argv0 are modified, so they cannot become const.
2000-11-02 15:47:02 +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
Rasmus Lerdorf
bccdaff6d1 Move server_filter to an extension-specific global 2000-10-23 00:52:11 +00:00
Rasmus Lerdorf
32b10882e5 Need a global server filter for the Apache 2.0 module 2000-10-22 19:50:05 +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
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
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
Sascha Schumann
16017f6d78 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

  All identifiers that begin with an underscore and either an uppercase
  letter or another underscore are always reserved for any use by the
  implementation.
2000-07-02 23:46:51 +00:00
Andrei Zmievski
4010b422dd Separate plain name returned by php_sapi_module() and pretty name
used for output.
2000-06-26 18:05:55 +00:00
Zeev Suraski
e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +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
Zeev Suraski
53586378b0 @- Fix a problem when dealing with large POST blocks in CGI mode 2000-04-01 01:11:39 +00:00
Rasmus Lerdorf
c32e09f791 As it turns out, there are some browsers that can't handle default
charsets.  I think forcing this on is going to cause us a lot of headache,
so turn it off by default.
@ Don't default to iso-8859-1 since this confuses some browsers
2000-03-20 08:19:51 +00:00
Thies C. Arntzen
245428b241 fix some protos 2000-03-19 10:56:40 +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
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
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
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
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
6723bdd920 request_info.c is giving up 2000-02-10 20:03:17 +00:00
Zeev Suraski
5bdd18caf1 Yes, you guessed it... More cleanup 2000-02-10 18:44:33 +00:00