1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Commit Graph

46 Commits

Author SHA1 Message Date
foobar f4983c0d3f - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
Sascha Schumann a26c1e1da1 Embed date of last modification 2003-10-14 08:11:37 +00:00
Sascha Schumann 5e3de075fb Fix potential buffer overrun 2003-09-20 12:45:05 +00:00
Sascha Schumann e5c5c491fb Simplify/fix logging 2003-06-16 19:11:33 +00:00
Sascha Schumann ef1263a589 Don't corrupt data during request body handling 2003-06-04 05:28:17 +00:00
Sascha Schumann edd6a6449a Properly timeout post requests 2003-05-15 16:54:37 +00:00
Sascha Schumann e473374ff3 Don't emit Content-Length in a 304 reply
Don't falsely claim HEAD method
Add PHP to HTTP server string
2003-05-15 16:42:43 +00:00
Sascha Schumann 33a10b342e Improved protection against hostname attacks 2003-05-06 19:17:50 +00:00
Sascha Schumann 9f4f0cec39 Fix Content-Encoding header lacking CRLF 2003-04-28 22:07:18 +00:00
Sascha Schumann 17f3aca625 Properly update the global httpd_time_now and remove php_makefile from diff 2003-04-21 01:08:23 +00:00
Sascha Schumann 8e165ea050 fix two uninitialized reads 2003-04-16 13:43:23 +00:00
Sascha Schumann cd403e3b51 Merging some Premium thttpd improvements, notably
- periodic update of date strings
- caching of Last-Modified values
- use of smart_str'ings for crafting HTTP header (static files)
  and inside make_log_entry
- buffered log writing
- httpd_ntoa is about 8 times faster

Overall improvement: Around 50% faster now
2003-04-16 09:20:55 +00:00
Sascha Schumann 778378dcc6 include limits.h for portability 2003-02-13 02:30:10 +00:00
Sascha Schumann e3831c2ef5 Add "log to stdout" feature 2003-02-11 00:58:54 +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
Sascha Schumann a8136b4dba Defend against pipelined requests on persistent connections as used by
IRCG. These could cause thttpd to start a second request in the same
connection context, and thereby causing real damage.

Mozilla 1.0.1 is buggy in that context: When HTTP/1.1 pipelining is
enabled (defaults to off), it will send any number of requests over
a persistent connection (which is fine), even after it has received
a "Connection: close" header field in a subsequent response header.
This blatantly violates RFC 2616, section 8.1.2. Because it cannot
receive any response on the dead connection, the download manager
pops up and tries to download a file (which never arrives).

Also, we don't try to send a 400 message anymore, if the connection
dies.
2002-11-10 15:21:13 +00:00
Sascha Schumann 10a861f93c - use TCP_DEFER_ACCEPT
- don't timeout connections which are managed by IRCG
- don't generate invalid HTTP replies, if the client did not send a
  request line yet
2002-11-06 17:31:03 +00:00
Sascha Schumann 082d9c4936 Simplify handler dispatching mechanism 2002-11-01 11:51:35 +00:00
Sascha Schumann 1a7a5b3982 Add missing return statement. 2002-11-01 11:44:50 +00:00
Sascha Schumann 7d504b230c improve host header checking, only affects systems which have virtual
hosting enabled
2002-11-01 11:40:26 +00:00
Sascha Schumann 55879b3543 first step towards asynchronous content body processing 2002-10-30 19:09:49 +00:00
Sascha Schumann 40b93fa16d add phppat/phpspat configuration file support and
fix some indention
2002-10-26 22:22:34 +00:00
Sascha Schumann 01bdc2e369 experimental .phps support 2002-10-26 20:55:41 +00:00
Sascha Schumann 7b3bea0b41 Donate "Fast Accept Loop" from Premium thttpd which speeds up processing
new connections when the connection table contains lots of entries.
2002-10-26 19:41:27 +00:00
Sascha Schumann 467fea036a Donate "Periodic Connection Expiring" from Premium thttpd, because
it is simple and gives a +40% improvement in terms of requests/s
when serving static files.
2002-10-26 18:14:45 +00:00
Sascha Schumann 47a1421d89 Redo the patch on Linux, the cygwin diff seems to be a bit broken. 2002-10-13 11:54:08 +00:00
Sascha Schumann 356f7503fa PHP + thttpd (+IRCG) build using CYGWIN now 2002-10-13 11:50:16 +00:00
Sascha Schumann 1f18eaadee Force /nocache/ entities to be delivered completely, even if a
broken proxy ignores our anti-cache headers and sends an IMS request.
2002-09-23 15:41:44 +00:00
Sascha Schumann c74f96333f Immediately unmap /nocache/ entries, so that the mmc cache does not get
polluted too much.
2002-09-21 17:23:15 +00:00
Sascha Schumann 8fd3f14ab1 Fix segfault due to unchecked null pointer 2002-07-26 16:16:12 +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 92a6f2c344 Sent proper encodings for gzip/compress files, otherwise IE won't
display them.

Refer to section 3.5, RFC 2616 -- these are IANA registered.

Patch submitted to author.
2001-12-10 14:09:08 +00:00
Sascha Schumann ef72a765bf Add a nocache feature: If documents are stored under /nocache/,
appropiate HTTP headers will be sent which prevent client/proxy caching.
2001-12-10 13:31:41 +00:00
Sascha Schumann f42acb0cd6 whoops, forgot to apply cgi/poll patch before diff'ing 2001-08-13 22:01:55 +00:00
Sascha Schumann 75c22e9a4a improved thttpd-2.21b patch.. I got tired of applying my patches for
these bugs.

fixes poll(2) issue
fixes hanging cgi issue
fixes off-by-one in scanning input buffers in case of EAGAIN/EWOULDBLOCK
fixes potential bug in managing write buffers
add "index.php" to default files to look for
2001-08-13 21:55:21 +00:00
Sascha Schumann ff423ef9d9 remove Only.* lines from patch 2001-04-22 14:33:57 +00:00
Sascha Schumann 38e55b3249 Update patch to thttpd-2.21 2001-04-22 14:00:53 +00:00
Sascha Schumann 4bb564ad2b Clear idle_read_timer 2000-11-15 23:37:50 +00:00
Sascha Schumann 39f8c9807e Update patch and add persistent connection handling 2000-11-13 13:33:12 +00:00
Sascha Schumann 251b83076e Move thttpd_php_init() call to httpd_initialize().
Otherwise, some init stuff was done twice (like resetting the
known_post_content_types hash table which caused post requests
to fail).
2000-08-21 03:04:35 +00:00
Sascha Schumann 67daa655f6 Execute PHP scripts everywhere (not only in the top-level directory) 2000-08-20 09:37:15 +00:00
Sascha Schumann 5c62b32823 Remove some crud from diff output (Only in..). 2000-08-07 13:56:52 +00:00
Sascha Schumann 4b8823d427 Fix building thttpd SAPI module.
This works now with thttpd 2.19.

Thanks to Andrzej Borsuk <andrzej.borsuk@alfaelektro.com.pl> for
pointing me into the right direction.
2000-08-07 13:54:35 +00:00
Sascha Schumann 56a5e84f9d Add SAPI module for thttpd server. Quote from the README:
This is a SAPI module for PHP 4.0 supporting thttpd, the tiny,
    turbo, throttling HTTP server by Jef Poskanzer.

    The module contains a patch against version 2.10 of thttpd. The patch
    adds hooks to thttpd to call PHP, if a filename matches *.php. This
    patch will be applied when you install PHP.

    While functional, this module exists primarily to demonstrate the
    ability of PHP to work in almost every web server environment.
1999-12-20 07:11:14 +00:00