Commit Graph

62 Commits

Author SHA1 Message Date
Nikita Popov
ecd13fd184 Fix bug #61139 gzopen leaks when specifying invalid mode
Needs to be merged to 5.4.
2012-02-19 14:39:29 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Pierre Joye
a531b5f0d2 - fix bug #52926, zlib fopen wrapper does not use the context 2010-09-26 20:46:54 +00:00
Michael Wallner
11d24c1593 * implement new output API, fixing some bugs and implementing some feature
requests--let's see what I can dig out of the bugtracker for NEWS--
  and while crossing the road:
   * implemented new zlib API
   * fixed up ext/tidy (what was "s&" in zend_parse_parameters() supposed to do?)

Thanks to Jani and Felipe for pioneering.
2010-05-31 10:29:43 +00:00
Jani Taskinen
af49e58f51 - Reverted r296062 and r296065 2010-03-12 10:28:59 +00:00
Jani Taskinen
06f072cb5e MFH: Improved / fixed output buffering (Michael Wallner) 2010-03-11 10:24:29 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Felipe Pena
0b3afcf67b - MFH: Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results) 2009-01-20 15:41:23 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
eec0b67cd8 Fixed bug #41304 (compress.zlib temp files left) 2007-05-08 12:08:17 +00:00
Dmitry Stogov
69cfe50f74 Prevent double close() of the same file handle 2007-04-26 12:52:58 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Nuno Lopes
ddb4d1fdcc move static declaration to *.c files
mroe static/const keywording
2006-08-14 20:08:18 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
ee8a0fc8f8 Fixed a nasty resource/memory/disk-space leak when opening zlib files
via wrapper stacking ala compress.zlib://http://...
2004-08-26 23:36:05 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Sara Golemon
c56647833b Route mkdir()/rmdir() via wrapper ops.
Move current rmdir()/rmdir() code to plain_wrappers.c
Implement mkdir()/rmdir() in ftp:// wrapper
2003-12-13 04:07:18 +00:00
Sara Golemon
b1f8236b63 Route rename() via wrapper ops.
Move current rename() code to main/streams/plain_wrapper.c
Implement ftp/rename()
Implement userstreams/rename()
2003-12-12 23:06:42 +00:00
Ilia Alshanetsky
402edee1a6 gztell() is not necessary, the return value of gzseek() represents the
new position. With zlib 1.1.4 gztell() alse returns 0 when working
on non-zlib files (test ext/zlib/tests/gzreadgzwriteplain.phpt).
2003-07-24 00:03:42 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sara Golemon
5126fbe556 Setup unlink() method in wrapper_ops structure, implement unlink in plainfiles wrapper, explicitly set method NULL in other wrappers (for now), and rewrite unlink userland function to call into wrapper_ops 2003-05-14 06:10:04 +00:00
foobar
d8a62b8e4d WS & CS fixes 2003-03-17 14:45:07 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Wez Furlong
abc4b4bb99 Fix for #21304 (gzopen did not report errors on open; "a" mode broken) 2002-12-31 11:42:15 +00:00
Wez Furlong
f4ca743d66 MFB zlib related fixes
(sorry I didn't get around to doing this sooner)
2002-12-09 10:54:20 +00:00
Hartmut Holzgraefe
8bd550825f email address change 2002-11-25 12:30:28 +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
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
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
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
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
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
Wez Furlong
62538caa86 Added BC support for old style zlib: wrapper.
Added notice when a requested wrapper is not found.
# This BC thing was giving me nightmares.
# It took me 10 minutes to realize I hadn't compiled in zlib support also.
2002-04-06 17:29:39 +00:00
Wez Furlong
2539cbc74c Phase 3 of OO wrapper cleanup
# What was phase 2?
2002-03-28 00:49:00 +00:00
Wez Furlong
5ee65bd8f5 Phase 1 of wrapper OO cleanup.
# Collecting underpants
2002-03-24 18:05:49 +00:00
Wez Furlong
06f6e47e4c Require that wrappers use <protocol>://<path> to avoid
ambiguities when filenames have ':' characters.
This slightly breaks BC with the old style zlib: wrapper.
2002-03-21 17:02:50 +00:00
Wez Furlong
c0e39dfa9c Implement bz2 streams and bz2: wrapper.
You can now do this:
copy("zlib:src.gz", "bz2:dest.bz2");
As with zlib, most of the functions with counterparts
in file.c are now aliases to those functions.
2002-03-21 02:27:41 +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
6f77640ca8 add forgotten parameter 2002-03-20 13:21:55 +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
Wez Furlong
5fb9f9c134 fix warning 2002-03-18 11:49:40 +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