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
Frank M. Kromann
7ff43f040f
Removing a unused local variable.
...
Setting the size before returning the value in readgzfile
2002-04-12 16:25:31 +00:00
Wez Furlong
e1d0a14790
Implement stream context and status notification system.
...
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
Stig Bakken
dedf2a4c39
@Add zlib.output_compression_level option (Stig)
2002-04-05 13:07:43 +00:00
Zeev Suraski
385b233040
Fix gzip/bz2 builds for Windows
2002-04-05 11:51:43 +00:00
Wez Furlong
5ee65bd8f5
Phase 1 of wrapper OO cleanup.
...
# Collecting underpants
2002-03-24 18:05:49 +00:00
Wez Furlong
8da0093935
really nuke it...
2002-03-21 01:22:36 +00:00
Wez Furlong
a662f012bb
Convert the gzfile related functions into aliases for their equivalents
...
in ext/standard/file.c, so a gzopen()ed file pointer can be used in
fread, fseek etc.
Improved behaviour of zlib stream.
Moved passthru code into streams.c
# I'm not happy about BG(mmap_file)
Nuked gzgetss_state as no longer needed.
2002-03-21 01:11:52 +00:00
Wez Furlong
3dbde95896
Make state parameter of php_strip_tags passed by reference.
...
Move state tracking to stream structure.
2002-03-20 14:38:13 +00:00
Wez Furlong
659a071e3d
Streams are all tracked as resources now.
...
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong
14d62c7b62
Add parameter here too...
2002-03-20 13:50:16 +00:00
Wez Furlong
06712a508a
Implement user-space streams.
...
There's probably room for improvement,
docs will following some time this week.
2002-03-19 03:51:01 +00:00
Wez Furlong
c9d5e13738
TSRMLS related work on streams, as discussed with Zeev.
...
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Zeev Suraski
73e79322ba
Fix the build and all of the outstanding VC++ warnings
2002-03-18 08:05:28 +00:00
Wez Furlong
d2d8762267
Streams now make more use of the memory manager, so tracking down
...
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Wez Furlong
5d0c53eecf
Fix some issues with gzFile and fsockopen.
2002-03-16 18:42:42 +00:00
Wez Furlong
bc264db921
change * formatting
2002-03-16 01:37:24 +00:00
Wez Furlong
0f65280cb5
New PHP streams...
2002-03-15 21:03:08 +00:00
Stefan Roehrich
edcb5813db
(PHP gzencode) Reimplementation of gzencode(). Now works as documented
...
(gzencode(string data [, int level [, int encoding_mode]])),
should fix #15930 .
@- The second parameter of gzencode() now is the compression level like
@ in the documentation. The encoding mode is a third (optional) parameter.
# Rework of gzencode(), output should be closer to real gzip output.
# I think in the old version there could be some problems with
# this function and output compression, should be fixed, too.
2002-03-12 13:23:58 +00:00
Stefan Roehrich
cede952f6a
(PHP gzinflate) Workaround for bug #14939 (buffer error in gzinflate()).
...
Fixed prototype and added test for #14939 .
# We have extra \0 if the input comes directly from gzdeflate()
# so give one extra byte as length to workaround behaviour of zlib.
# I want to avoid copying the input, but if there are problems,
# please tell (see my message <20020310175611.GA4472@stefan.roehri.ch> to
# php-dev).
2002-03-12 13:06:40 +00:00
Yasuo Ohgaki
82a8d372e5
Added ob_get_status() to get array of buffers and it's status.
...
(DO NOT document this function yet)
Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.
php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.
Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.
Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.
@ - Added ob_get_status() to get array of buffers and it's status. (Yasuo)
@ - Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
@ buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
@ deleted until script finshes. (Yasuo)
@ - Changed ob_*() function that have void return type to bool. All ob_*()
@ functions return TRUE for success, FALSE for failure. (Yasuo)
2002-03-01 03:05:50 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
foobar
cc196f5b54
Show the registered ini entry in phpinfo()
2001-11-26 22:56:36 +00:00
Rui Hirokawa
506eec88b4
restriction is relaxed because output handler couldn't be used even if zlib.output_compression is set to off.
2001-11-23 02:53:16 +00:00
Derick Rethans
10fe28c8ab
- fix crash bug
2001-10-27 18:22:56 +00:00
foobar
5ee719bae0
Modified the error message a bit. Happy now Andi? :)
2001-10-27 10:14:14 +00:00
foobar
609271e651
- Prevent PHP from starting if output_handler is set and
...
zlib.output_compression is on
- Added notes to the bundled php.ini files about this.
2001-10-27 05:22:19 +00:00
Stig Bakken
689252082c
* zend_module_entry change: apino, debug and zts are moved first,
...
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Jeroen van Wolffelaar
6cfba2a3ea
2nd phase in back-substitution those macro's
...
I've got pretty much everything now...
2001-09-25 22:49:04 +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
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
Zeev Suraski
e9da242ed4
Send Content-Length if we're sending just one chunk
2001-08-16 23:34:25 +00:00
Sascha Schumann
23b9300fd1
more tsrm cleanup
2001-08-06 03:50:52 +00:00
Sascha Schumann
b349df6364
some more eliminate-fetches-or-escalate-them-at-least
2001-08-05 16:21:33 +00:00
Sascha Schumann
8aef193056
more tsrm cleanup
2001-08-05 15:29:47 +00:00
Zeev Suraski
b1de7fc900
More TSRMLS_FETCH annihilation. Enough for today...
2001-07-31 07:09:49 +00:00
Zeev Suraski
bc42c37513
More TSRMLS_FETCH work. Got it under 400 now.
2001-07-31 06:28:05 +00:00
Zeev Suraski
aa1772ca72
More TSRMLS_FETCH annihilation
2001-07-31 05:44:11 +00:00
foobar
3b7bc2535a
Make this compile in ZTS mode.
2001-07-30 19:39:26 +00:00
Zeev Suraski
797a079a95
More TSRMLS_FETCH work, and a bit of cleanup
2001-07-30 06:18:13 +00:00
Zeev Suraski
1c25b8dd53
Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way
2001-07-30 01:56:43 +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
Thies C. Arntzen
d30590369a
make sure all string from zlib are \0 terminated.
...
change one realloc to erealloc (though this code is never reached IMHO)
add regression tests
2001-07-13 15:48:37 +00:00
Thies C. Arntzen
11eca11dca
fixed #12091 . added \0 bytes at EOS in a few cases.
2001-07-13 15:19:17 +00:00
Thies C. Arntzen
bbe83e4f29
gzencode() now zero-terminates its buffer.
2001-07-11 15:26:42 +00:00
Rasmus Lerdorf
81e2cf03ac
Fix folding and clean up some extensions
2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d
vim-6 does folding - clean up a bunch of missing folding tags plus
...
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Stig Bakken
1beda9ee1e
* include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build)
2001-05-24 10:07:29 +00:00
Anil Madhavapeddy
2df7c8a0f1
Send the correct Vary headers, if we negotiate a gzip/deflate session
...
via Accept-Encoding. This obeys a SHOULD directive in RFC2616
PR: 10070
2001-03-30 17:44:08 +00:00
Daniel Beulshausen
177f9bd1f5
add missing globals fetches
2001-03-07 17:23:30 +00:00
Zeev Suraski
0b65578ec7
Implement internal output compression?\0020:wq
2001-03-06 20:43:54 +00:00
Zeev Suraski
39724f6e4a
Implemented chunked output buffering support - it's quite cool!
2001-03-04 15:12:38 +00:00
Andi Gutmans
eb6ba01d1c
- Fix copyright notices with 2001
2001-02-26 06:11:02 +00:00
Sascha Schumann
c2fb53bed7
Finish fopen-wrappers rename.
2001-02-23 22:07:16 +00:00
Thies C. Arntzen
9c1abab2db
ws-only
2001-02-01 17:16:35 +00:00
Thies C. Arntzen
1366f67d0b
@- When using the ob_gzhandler() PHP now automagically also sets the
...
@ Content-Lengh correctly which enables browsers to use the HTTP
@ Keep-Alive feature. (Thies)
2001-02-01 17:14:18 +00:00
Sascha Schumann
a4df53ad1c
Fix a huge memory leak in the ob_gzhandler.
2001-02-01 16:29:07 +00:00
Hartmut Holzgraefe
cedb39ee56
all the _GNU_SOURCE dependant stuff is now in zlib_fopen_wrapper.c
...
so all the #define/#include workarounds in zlib.c are no longer needed
2000-11-21 00:40:13 +00:00
Hartmut Holzgraefe
67bb9d1ae2
fixed a compile problem with glibc<=2.1.1 ( #7327 , #7892 )
...
# zlib.c still produces a warning, perhaps i should move
# the fopen wrapper to a seperate file to get things right
# but i think i will wait for the autoconf book to arrive
2000-11-20 21:36:38 +00:00
Zeev Suraski
6a86b6fad5
Handle unable-to-add-new-headers error nicely
2000-11-13 19:05:25 +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
Marc Pohl
4eece9b1bd
add gzdeflate() and gzinflate() for handling of pure gzip-datastreams
2000-11-08 21:40:34 +00:00
Hartmut Holzgraefe
6b435870de
type fixes to make compilers happy
2000-10-27 10:48:07 +00:00
Andrei Zmievski
f1dcb32c9f
Use zend_register_list_destructors_ex() instead.
2000-10-25 17:44:02 +00:00
Sascha Schumann
2d7860edc7
__USE_GNU shall not be defined by application
2000-10-23 14:04:54 +00:00
Daniel Beulshausen
6911ee5b99
it's n.a. on win32 :)
2000-10-23 13:56:22 +00:00
Stanislav Malyshev
48e5d3189f
Make zlib compile again
2000-10-23 13:19:07 +00:00
Andi Gutmans
4d676fe9d8
- including php.h automatically includes the PHP config file.
2000-10-21 19:18:55 +00:00
Daniel Beulshausen
bef776742c
i can find no php_config.h on win32 :)
2000-10-21 17:19:23 +00:00
Andrei Zmievski
7b4983c8f8
Mega-patch to get better resource information for modules.
...
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
* Switched register_list_destructors() to use
zend_register_list_destructors_ex() instead
* Updated all relevant modules to provide the resource type name
to register_list_destructors() call
* Updated var_dump() to output resource type name instead of number
@- Made resource type names visible, e.g. var_dump() and
@ get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Hartmut Holzgraefe
cae27179ce
fopen wrappers cleanup
...
- comfiguration is now done by an ini parameter
instead of a compile time option
- the implementations of the three standard wrappers
now live in seperate files in ext/standard
- the compiler is happy again, no more warnings
2000-10-13 00:09:31 +00:00
Hartmut Holzgraefe
5423a08558
@ -read and write .gz-files transparently on glibc based systems
...
@ using the 'zlib:' fopen wrapper (Hartmut)
2000-10-11 22:40:22 +00:00
Egon Schmid
7ad2213278
Forgotten to change.
2000-07-13 18:27:10 +00:00
Egon Schmid
86dfb4c292
Corrected some protos.
2000-07-13 18:21:40 +00:00
Thies C. Arntzen
2b70aaf12d
@- Fixed crash in gzopen(). (Thies)
...
# hmm - this should be rethought as one should be able to do
# gzopen("http://..")
2000-07-06 11:25:24 +00:00
Andi Gutmans
229b170885
- Don't depend on USE_PATH being equal to 1. Use #define value
2000-06-26 18:19:35 +00:00
Zeev Suraski
90feef368b
- Please NEVER copy fopen_wrappers.c functions to modules. They are ugly
...
- enough as is and need cleaning up. Duplicating the mess makes things just
- worse and prevents bug fixes in the functions from propogating throughout
- PHP.
- This fix is untested so someone who uses zlib, please test it and report
- back.
2000-06-26 17:40:24 +00:00
Zeev Suraski
6614e8edb4
- I wrote a long msg but the commit didn't go through.
...
- So here is the short version:
- a) Start moving to binary opens in Windows
- b) Give checkuid_mode() a small face lift including the fopen-wrappers.c
- The mode to this function should at least be a #define but that is for
- another day. Anyway this whole stuff should be given more face lifts in
- the future.
2000-06-25 17:02:59 +00:00
Sascha Schumann
0c03253635
Stop including dl/phpdl.h.
2000-06-24 15:36:04 +00:00
Hartmut Holzgraefe
87a491d7b6
C++ // comments are evil ...
2000-06-16 18:24:02 +00:00
Andi Gutmans
3701bc4207
- ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch
2000-06-05 19:47:54 +00:00
Hartmut Holzgraefe
a9abc3ab6b
added functions gzcompress() and gzuncompress() for direct string
...
compression as requested by BugId #1151
2000-05-25 16:35:49 +00:00
Sascha Schumann
4686a3b50e
Use #ifdef COMPILE_DL_EXTNAME solely.
2000-05-23 09:33:51 +00:00
Zeev Suraski
e043439ff6
Update the license with the new clause 6
2000-05-18 15:34:45 +00:00
Sascha Schumann
fe50664d4d
#if COMPILE_DL
...
becomes
#if defined(COMPILE_DL) || defined(COMPILE_DL_EXTENSION_NAME)
2000-05-02 00:44:35 +00:00
Sascha Schumann
0d383d9373
Replace the various get_module() functions with a uniform
...
ZEND_GET_MODULE(name) macro.
2000-05-02 00:30:36 +00:00
Zeev Suraski
883bd2b1de
- Fix virtual cwd bug
...
- Add more V_STAT() V_LSTAT() changes
2000-04-20 17:24:01 +00:00
Frank M. Kromann
7412bd5c84
Making zlib compile under Win32 and fixing a typo
2000-04-20 16:59:55 +00:00
Colin Viebrock
0c2b366ce1
phpinfo() prettying
2000-04-05 21:43:03 +00:00
Sascha Schumann
caeaaf4d98
Fix build on systems which lack snprintf or vsnprintf.
...
PR: #3786
2000-03-12 15:47:34 +00:00
Egon Schmid
c07b5282af
More protos.
2000-02-24 14:43:53 +00:00
Zeev Suraski
86fa2aade2
the pipe is breaking all the time
2000-02-19 23:41:32 +00:00