Commit Graph

95 Commits

Author SHA1 Message Date
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +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
Rasmus Lerdorf
fdaa130f3a Add the new request_time sapi struct entry to all the sapis. Some of these
may have ways of getting the request time without the extra syscall, but
for now let's just make sure we don't crash and people will eventually
fill these in where applicable.
2004-12-20 19:33:41 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Sascha Schumann
6dcf9c22b5 properly restart syscalls 2003-07-01 05:29:17 +00:00
Sascha Schumann
a5017f0b4c Serialize headers for systems with low IOV_MAX (e.g. Solaris) 2003-06-27 18:41:11 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sascha Schumann
4247f4b90e Don't return CRLF from broken clients 2003-06-04 05:13:59 +00:00
Sascha Schumann
528c495d68 If there is a content body, enable lingering and disable keep alive. 2003-05-16 22:32:22 +00:00
Sascha Schumann
3eab2fb3bd improve keep alive handling 2003-05-12 01:29:21 +00:00
Sascha Schumann
40dd3617eb add premium thttpd support 2003-05-12 01:02:08 +00:00
Sascha Schumann
833d734af1 cleanup 2003-05-01 20:49:42 +00:00
Sascha Schumann
4ff425c157 Nuke all sn?printf's and rely on the optimized httpd_ntoa to
convert the IP to a string representation.
2003-04-16 13:37:34 +00:00
Sascha Schumann
ba32a619ae use SUCCESS/FAILURE instead of 0/-1 2003-02-09 21:15:55 +00:00
Sascha Schumann
ebedf060a5 Fix POST handling once and for all. The daemon now never blocks and handles
uploads of up to 2GB on 32 bit platforms.

Uploads >16KB are put into a file-backed mmap area.

SG(request_info).content_type got corrupted somewhere. As a workaround,
we provide SAPI with a duplicate of the original string.
2003-01-17 18:53:22 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Sascha Schumann
95fead0b9f add missing line 2002-11-29 11:34:08 +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
Sascha Schumann
f2f443f066 s/PHP_API/PHP_API_VERSION/ 2002-11-08 13:29:32 +00:00
Sascha Schumann
8d25447f30 let this source file compile with php 4.2.x 2002-11-07 11:56:02 +00:00
Sascha Schumann
55879b3543 first step towards asynchronous content body processing 2002-10-30 19:09:49 +00:00
Sascha Schumann
7a0850a344 Fix build and .phps support 2002-10-26 21:06:10 +00:00
Sascha Schumann
01bdc2e369 experimental .phps support 2002-10-26 20:55:41 +00:00
Sascha Schumann
c46ed2114e not sure what this async_send is doing in here, so relieve it from its duty. 2002-10-26 20:45:35 +00:00
Sascha Schumann
b9135d74e9 some system headers (irix) define sa_len
prefix sa_len with x
2002-10-26 15:47:22 +00:00
Sascha Schumann
0a80a78670 thttpd initializes contentlength to -1, so we need to transfer that to 0
for SAPI/PHP.  Otherwise, SAPI will try to read (unsigned long) -1 bytes
from the connection.
2002-10-25 01:10:50 +00:00
Sascha Schumann
625e7b202b Use generic getnameinfo for address-to-name translation, if available.
This adds support for IPv6 addresses.
2002-09-23 00:49:12 +00:00
Zeev Suraski
76312b4508 another startup initialization fix - only ISAPI and CGI SAPI's tested,
minor compile buglets might occur in other SAPIs, but should be trivial
to fix...
2002-09-18 21:57:42 +00:00
Sascha Schumann
fa3d840cd1 integrate the public keep-alive patch
the patch did not handle pipeling at all, so that some code had to be added
from Premium thttpd

persistent connections are supported, if a script sets the Content-Length
header
2002-07-14 18:01:08 +00:00
Sascha Schumann
b4c28fba7f thttpd blocks in rare circumstances where it cannot write out a small HTTP
response (happened at customer sites).  The response is now written out
using the standard state machine.

the buffer which is handed to thttpd by php is now simply dealt with as if
it were a thttpd generated response (avoids code duplication).
2002-07-14 13:48:46 +00:00
Sascha Schumann
402cc031cd make the sapi module hand off a buffer to thttpd for final data delivery,
instead of blocking the whole process
2002-07-14 13:10:34 +00:00
Sascha Schumann
d7edeee55f Improve readability of the header send function 2002-05-17 21:22:30 +00:00
Sascha Schumann
5c2d995f0b Provide access to ini settings.
Properly block the thread, if IO is not ready on a fd.
2001-12-13 11:15:56 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Sascha Schumann
1f6f91035e Get rid of post_off-hack which was only suitable for POST data
which fit into the small thttpd read buffer.  Do a small recv
after content-length bytes have been read to accomodate non-conforming
user-agents.
2001-10-27 12:08:10 +00:00
Sascha Schumann
a3368ababa Improved handling of posts 2001-10-27 11:27:39 +00:00
Sascha Schumann
49b44d537f Make the information available whether we are using HTTP/1.1 2001-10-09 15:15:55 +00:00
Sascha Schumann
6db3f409d8 Add QUERY_STRING, HTTP_HOST, HTTP_ACCEPT_LANGUAGE to the script
environment.

Also support setting the INI path from the outside.
2001-09-30 18:23:28 +00:00
Jeroen van Wolffelaar
eb38ca844b Undo Z_ subst for sapi and ext/yaz 2001-09-27 20:01:23 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Sascha Schumann
64c4456cca A CRLF at the end of a line is not so wrong. 2001-08-07 08:35:54 +00:00
Sascha Schumann
61618d4a03 The module usually did not send out Content-Type: text/html.
No major browser seems to care, Opera does though.
2001-08-07 08:34:02 +00:00
Sascha Schumann
8aef193056 more tsrm cleanup 2001-08-05 15:29:47 +00:00
Sascha Schumann
0af7ad15f5 further tsrm cleanup 2001-08-05 14:17:55 +00:00
Sebastian Bergmann
7168c31482 Even more TSRM cleanup. 2001-08-05 13:26:54 +00:00
Sascha Schumann
7263485576 tsrm-related cleanup 2001-08-05 10:32:48 +00:00
Sebastian Bergmann
a70ecedb33 Remove more duplicate TSRMLS_FETCH() calls. 2001-08-05 05:35:06 +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
Sascha Schumann
7c43206fb8 Remove unneeded variables 2001-07-26 18:10:38 +00:00