1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

233 Commits

Author SHA1 Message Date
Moriyoshi Koizumi c8d4018067 MFH: fixed zlib.output_compression 2003-02-11 02:26:37 +00:00
Sebastian Bergmann ec46829b38 MFH: Bump year. 2002-12-31 16:37:36 +00:00
Wez Furlong ac07cbb0ca MFH: Fix for 21304 (gzopen not reporting errors, "a" mode broken). 2002-12-31 11:43:02 +00:00
Ilia Alshanetsky ce2ae19703 MFH 2002-12-31 00:05:19 +00:00
Ilia Alshanetsky ca8772a059 MFH 2002-12-30 19:41:00 +00:00
Wez Furlong f57ac2fa05 Centralize the fopencookie test. 2002-12-09 18:28:03 +00:00
Wez Furlong 5302361ece Be pedantic with the return value 2002-11-19 21:11:03 +00:00
Wez Furlong f96922968f Add this test for gzreading non-compressed data. 2002-11-19 20:13:24 +00:00
Wez Furlong 26a1202ee0 Remove a memset I added while debugging 2002-11-19 20:04:15 +00:00
Wez Furlong 915c446634 Resolve some problems with zlib streams, mostly related to opening the
stream with an invalid mode.
There still seem to be some issues when reading from non-compressed files.
Investigation continues.
2002-11-19 18:34:55 +00:00
Wez Furlong d6ee6ce580 Remove redundant info line (all wrappers are listed near the start of
the phpinfo page).
2002-11-18 11:03:38 +00:00
Moriyoshi Koizumi 7f5d98203e Fixed OnUpdate_zlib_output_compression() behaviour 2002-11-03 20:31:00 +00:00
Wez Furlong 30f9c47d61 Fix for 19906.
gzeof has different semantics from feof, in that gzeof will return true
if the read position is at EOF, even if the most recent read was 100%
successful.
feof will return true only (usually) if the most recent fread failed.
2002-10-15 16:01:00 +00:00
Wez Furlong 94ef7bc81e Don't use streams-level buffer on zlib streams. 2002-10-15 02:27:15 +00:00
Rasmus Lerdorf 5acdd41d6e Make zlib-dir actually mean something during the check 2002-10-07 22:27:50 +00:00
Rasmus Lerdorf 74286bd28d Argh! Revert. I'm on drugs. Was linking in a newer libz when I checked
this.
2002-10-07 21:13:46 +00:00
Rasmus Lerdorf a6b780f94e Oops, should still define that. Didn't think I needed it as nothing in
ext/zlib checks it, but it is checked elsewhere.
2002-10-07 20:59:59 +00:00
Rasmus Lerdorf 6446f7158b This restriction is no longer true after the streams changes. 2002-10-07 20:55:41 +00:00
Wez Furlong 077fe52d8b This seems to resolve the issues with fgets.
I've moved EOF detection into the streams layer; a stream reader
implementation should set stream->eof when it detects EOF.
Fixed test for user streams - it still fails but that is due to an output
buffering bug.
2002-10-05 10:35:13 +00:00
Yasuo Ohgaki 22bf29384e Move wrong output buffer usage check to ob_gzhandler init.
Export some output buffer functions.
2002-10-03 03:58:12 +00:00
Marcus Boerger d4bba6d158 Revisted Wez patch: chunk_size 0 means cahce the whole output. So
we must apply the default before calling php_enable_output_compression().
I have left the default setting in the rinit function even though i do think
it is not necessary.
2002-10-02 15:02:16 +00:00
Wez Furlong 4356932dfe Fix infinite recursion bug when using zlib output compression.
Cause: the chunk size is taken from the zlib.output_compression setting,
which is 0 or 1.  This causes the block_size for output buffer to be set
to 0 (1 / 2) and thus causes infinite recursion in php_ob_allocate().
Solution: use a value of 0 for the chunk size which will use the default
sizes.  Also add a sanity check which will default the block_size to 1
if it ends up as 0.
2002-09-30 10:18:06 +00:00
Wez Furlong 3a67c67737 Rename file_get_wrapper_data -> file_get_meta_data.
It now always returns useful information for all streams.
Unified that data with socket_get_status and made socket_get_status
an alias for file_get_meta_data.

Fix Location header following which was broken in this commit:
http://cvs.php.net/diff.php/php4/ext/standard/http_fopen_wrapper.c?r1=1.41&r2=1.42&ty=h
2002-09-26 10:14:41 +00:00
Wez Furlong 4d8a07d529 Implement read buffering in streams.
Eliminate similar code from network.c.
Implement fgets equivalent at the streams level, which can detect
the mac, dos and unix line endings and handle them appropriately.
The default behaviour is unix (and dos) line endings.
An ini option to control this behaviour will follow.
# Don't forget to make clean!
# I've done some testing but would appreciate feedback from
# people with scripts/extensions that seek around a lot.
2002-09-23 01:47:04 +00:00
foobar 3bf7519210 @- Added --disable-all configure option. (Jani) 2002-09-04 18:47:28 +00:00
foobar 639221694f Use zend_ini_string instead of the 'alias'. 2002-09-03 22:54:02 +00:00
Zeev Suraski a6e8e72372 Fix ob_gzhandler()'s handling of requests w/o compression but that do have
the Accept-Encoding header
2002-08-23 08:37:35 +00:00
Wez Furlong 62b7b412e2 *cough* 2002-08-22 17:40:25 +00:00
Wez Furlong a388ab6205 Fix error messages. 2002-08-22 17:37:46 +00:00
Stefan Roehrich 0ea1dda8cd Fixed prototype.
Fixed double printing of function name in docref error messages.
2002-08-22 09:38:55 +00:00
Marcus Boerger f15b4c1e30 change to php_error_docref()
#documentation about output relevant ini settings will be in ref.outcontrol
2002-08-20 20:22:30 +00:00
Marcus Boerger fdf514f45c Changed handling of output buffer sizes. 2002-08-20 19:51:00 +00:00
Yasuo Ohgaki 42355837c1 Changed my mind.
Let users decided whether users want larger chunk size or not.
@ Changed zlib.output_compression behavior. If larger chunk is preferred,
  enable output_buffering also. (Marcus, Yasuo)
2002-08-11 02:32:49 +00:00
Yasuo Ohgaki 02ed705818 Generally speaking, sending packets less than 1KB is not efficient.
We're better to take some benchmarks see if removing extra buffer
is actually a good idea or not.
2002-08-11 01:11:11 +00:00
Marcus Boerger 21903dfc7e corrected handling of internal output buffers
minor fixs
2002-08-10 16:12:36 +00:00
Marcus Boerger ff63bf2a4f no need to start additional first buffer when output compression is first buffer 2002-08-10 12:58:46 +00:00
Marcus Boerger 289607970c should fix all windows warnings 2002-08-10 10:40:59 +00:00
Marcus Boerger 9c8ba935d6 Improved handling of output buffers (see news)\n#No trim for the string parameter... 2002-08-09 22:29:58 +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
Derick Rethans 94127f25e3 - oops... read before commit :) 2002-06-18 10:09:41 +00:00
Derick Rethans 81860467d4 - It doesn't work from within a script... so we disallow it 2002-06-18 10:06:54 +00:00
Stefan Roehrich cce0d2f72d Added "Vary: Accept-Encoding" header to zlib.output_compression
compressed output as with obgzhandler().
@ If zlib.output_compression is enabled and a page is compressed
@ a "Vary: Accept-Encoding" header is added. (Stefan)
# obgzhandler() sends this header, I think it is recommened by
# RFC 2616. If there are problems (e.g. with some browsers)
# it should be reverted.
2002-06-02 21:35:06 +00:00
Yasuo Ohgaki 43df0c78c0 Move Content-Length: header handling from zlib.c to output.c
When output buffer is enabled and header can be sent, Content-Length:
header is added always from now on.
2002-05-02 01:12:01 +00:00
Sascha Schumann 30fd7de1fa s/len/xln/ was necessary here
Noticed by: Charles O Parks III
2002-04-27 23:37:17 +00:00
Sascha Schumann aab439f26f Use a single macro to set cl header 2002-04-27 18:41:38 +00:00
Thies C. Arntzen 7b59a131b6 @ - If possible set Content-Length header in zlib.output_compression mode. (thies) 2002-04-27 17:03:32 +00:00
Wez Furlong 928bae9cf8 Make scheme part decoding rfc2396 compliant.
Change zlib:// and bzip2:// to compress.zlib:// and compress.bzip2://
Tidy up old socket/network code/comments.
2002-04-19 10:06:41 +00:00
Wez Furlong b10b24d50c Always initialize wrappers, regardless of PG(allow_url_fopen).
Add is_url field to wrapper structure; the stream wrapper openers
will disallow opening is is_url && !PG(allow_url_fopen).
Add infrastructure for stat($url) and opendir($url).
Tidy up/centralize code that locates and instantiates wrappers for the
various operations.
Implement opendir for plain files.
Make the PHP opendir and dir functions use the streams implementations.
Add modelines for syntax highlighting the pear scripts in vim
2002-04-16 22:14:27 +00:00
Wez Furlong 1f4d4873dc remove old code 2002-04-16 14:47:20 +00:00
foobar 067ca4e813 Do NOT use C++ comments in C code. 2002-04-12 21:19:59 +00:00