Commit Graph

89 Commits

Author SHA1 Message Date
Marcus Boerger
3577115118 - MFH Add strict compliant RFC2397 support (no //) 2006-05-14 18:40:12 +00:00
Wez Furlong
8663f1644d fix for #37158 2006-04-22 17:17:40 +00:00
Michael Wallner
f7a6327728 - Fix reading stream filters never notified about EOF 2006-04-20 17:43:18 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Antony Dovgal
248be6fcfc fix #35781 (stream_filter_append() can cause segfault) 2005-12-23 14:32:11 +00:00
Antony Dovgal
aec3b4e73c fix #35740 (memory leak when including a directory) 2005-12-20 09:47:57 +00:00
foobar
a3af52c11e MFH: list_entry -> zend_rsrc_list_entry 2005-12-05 23:38:04 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Dmitry Stogov
8b134356ef Disabled search of recored separator outside of buffer 2005-06-01 15:11:44 +00:00
Antony Dovgal
d4db964aed revert by Wez's request 2005-05-23 15:36:58 +00:00
Antony Dovgal
201fbc48e6 fix bug #32810 (fread after tmpfile() reads only 8192 bytes) 2005-05-23 11:51:53 +00:00
Antony Dovgal
d5bb03b11a fix bugs #32742 (segmentation fault when the stream with a wrapper is not closed),
#32171 (Userspace stream wrapper crashes PHP)
2005-05-16 08:37:14 +00:00
Ilia Alshanetsky
edd4860674 Attempt to eliminate seek() prior to every write. 2005-04-29 19:01:33 +00:00
Antony Dovgal
2a83dbdf1c revert the patch, the problem seems to be somewhere else 2005-04-11 15:19:27 +00:00
Sara Golemon
dc8823b565 Fold validation into an inlined function per Andi's suggestion 2005-04-09 19:36:49 +00:00
Antony Dovgal
e7a2efe053 do not try to read after EOF 2005-04-06 08:26:06 +00:00
Ilia Alshanetsky
d9aea604b3 Fixed bug #30362 (stream_get_line() not reading data correctly). 2005-04-05 03:00:04 +00:00
Sara Golemon
51852db0df BugFix #32563
This could have been done in stream_wrapper_register()
without introducing the slight performance hit on
wrapper registration since anyone registering a wrapper
in an extension should know better.

The important thing is that since locate_wrapper makes
the assumption that all schemes will be /^[a-z0-9+.-]+$/i
Anything which registers them should make the same assumption as well.
2005-04-04 19:34:32 +00:00
Ilia Alshanetsky
c7b931d80d Fixed bug #31515 (Improve performance of scandir() by factor of 10 or so). 2005-02-22 00:24:13 +00:00
Ilia Alshanetsky
d98a44d483 Fixed bug #29801 (Set limit on the size of mmapable data). 2004-11-15 23:43:12 +00:00
Rob Richards
d563495a24 add support for file://localhost/
support file:/// under windows again
2004-11-11 13:08:32 +00:00
Ilia Alshanetsky
5c04e39383 Fixed bug #30362 (stream_get_line() not handling end string correctly). 2004-10-11 18:31:49 +00:00
Sara Golemon
34550382d8 Added stream_filter_remove() to cancel a stream filter.
Register filters as resources when
instantiated by stream_filter_(ap|pre)pend().

Export php_stream_filter_flush() internal function to wind buffered data
out of a particular filter until consumed by a later filter or sent to
stream->readbuffer or stream->ops->write()
2004-09-14 03:48:17 +00:00
Sara Golemon
9cd4320b65 Allocating hash tables should be done via macro, not directly 2004-09-13 21:07:22 +00:00
Sara Golemon
ed5dcbff9b A little extra code to allow overriding plainfiles wrapper as well 2004-09-10 21:50:29 +00:00
Sara Golemon
955b43ba12 Add stream_wrapper_unregister()
Disables a wrapper (user-defined or built-in) for the life of the request.

Add stream_wrapper_restore()
Restores the wrapper originally defined at the time the request started
to the protocol name mentioned.
2004-09-10 20:45:35 +00:00
Sara Golemon
d179ac771c Handle maxlen when stream can't be mmaped 2004-09-08 18:42:15 +00:00
Antony Dovgal
fd6d9cbeac fix bug #29723 (file_get_contents() fails with the file:// wrapper under Win32) 2004-08-31 11:37:02 +00:00
Wez Furlong
971fcd4254 Looks like Sara forgot to change this too. 2004-07-13 16:34:56 +00:00
Wez Furlong
ae40d0ef2a Fix file_get_contents() bug... 2004-07-12 20:59:24 +00:00
Wez Furlong
cd732f1a3f RIP: greedy ready problems
This allows people to use fread($fp, filesize($filename)) for regular files,
but packet-based non-greedy reads for everything else.
2004-07-10 10:54:09 +00:00
Wez Furlong
8f435013ff Fix for Bug #28964 fread "greedy" behaviour 2004-06-29 21:51:53 +00:00
Sara Golemon
a2c24ae90e BugFix#28868 (Part Two): This fixes thread unsafety in the userspace
filters which relates to the fix just applied for userspace wrappers.
2004-06-21 21:08:05 +00:00
Sara Golemon
7fcfa8865e BugFix#28868: Wrapper hash not thread-safe.
Userdefined wrappers were being registered into a global wrapper hash
which can cross threads.  Termination of once instance then has the
potential to leave an active stream in another instance with no wrapper
leading to segfault.
2004-06-21 18:58:55 +00:00
Wez Furlong
b369925372 Fix #25939 for good this time.
# How could I miss this??
2004-05-27 13:04:14 +00:00
Sara Golemon
002f7ef393 This leaks when a stream opener proxy opens another stream. 2004-04-01 01:07:54 +00:00
Sara Golemon
72616e6eae BugFix#27619
Filters not applied to pre-buffered stream data.
(esp. http:// streams)
2004-03-31 23:48:59 +00:00
Wez Furlong
70757063a7 add cast for qsort compare function.
Kinda ugly, but helps assert that we are doing the right thing as well as
kill the warning there.
2004-03-07 22:06:36 +00:00
Wez Furlong
0dd2280102 Less magic please 2004-03-07 21:36:55 +00:00
Jon Parise
4db900732d Cast the php_stream_dirent to a 'const char *' for estrndup() to avoid a
compiler warning.
2004-03-01 07:02:23 +00:00
Wez Furlong
a44838e8a3 Fix a bug in the persistent socket liveness checks and feof(); they were
using the default socket timeout of 60 seconds before returning the socket
to the calling script.  The reason they were using that value is that the
same code is used for feof(), so the fix is allowing the caller to
indicate the timeout value for liveness checks.

A possible remaining issue now is that 0 second timeout[1] for pfsockopen
is possibly too short; it's impossible to specify a sane value for all
possible uses, so maybe we need a stream context or an .ini option to
control this, or maybe use the timeout value that was passed to
pfsockopen().

# [1] by timeout, I mean the time that PHP will wait for data on a
# persistent socket before deciding if a new connection should be made;
# NOT the timeout while waiting for a new connection to be established.
2004-02-04 22:46:44 +00:00
Sara Golemon
6d10371ec6 'Bug Fix': scandir, being a new function in PHP5 should have always been wrapper aware. 2004-01-28 22:21:54 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Sara Golemon
a67bf6ecc9 Fix Win32 Build. mkdir/rmdir are macros 2003-12-13 18:48:39 +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
Wez Furlong
ab0029cabf Be smarter about which systems should register unix transports.
Fix skip conditions in these network tests
2003-12-05 13:41:02 +00:00
Sara Golemon
026d4c9e4c Route php_stat() via streams/url_stat API (php_stream_stat_path).
This enables fopen-wrappers support on stat() and related family calls.
2003-11-28 23:25:28 +00:00
Wez Furlong
6d86bb9e40 (sort of) MFB, feof fix for sockets. 2003-11-28 23:20:23 +00:00
Ilia Alshanetsky
baced1d63d Fixed a memory leak. 2003-11-28 00:00:28 +00:00
Sara Golemon
0831f2b03a Fix for file:// wrapper parsing.
(Cristiano Duarte <cunha17@uol.com.br>)
2003-11-23 17:35:00 +00:00