Commit Graph

189 Commits

Author SHA1 Message Date
Felipe Pena
d3849fc38c - Fixed bug #49936 (crash with ftp stream in php_stream_context_get_option())
(patch by Pierrick)
2009-11-15 20:30:57 +00:00
Kalle Sommer Nielsen
fef66b3c2d Kill compiler warnings 2009-08-01 14:45:42 +00:00
Arnaud Le Blanc
7b3ee6dc6f Fix build 2009-05-19 10:04:35 +00:00
Arnaud Le Blanc
587137b2d3 un-duplicated code (merged unicode/string variants of stream_copy_to_stream
and let the compiler optimize specializations)
2009-05-17 16:52:35 +00:00
Arnaud Le Blanc
0e4de79b40 Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not
update stream position of plain files)
2009-05-17 14:57:05 +00:00
Arnaud Le Blanc
804ed57ad3 Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source
is a socket)
2009-05-16 20:22:29 +00:00
Arnaud Le Blanc
6b213bffb6 Better fix for #47997 2009-04-19 17:09:47 +00:00
Arnaud Le Blanc
069c0fdc80 MFB5.3: Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams) 2009-04-19 13:50:25 +00:00
Felipe Pena
8ecf8ede1f - Removed:
- UG(unicode) checks
       - pcre_cache_entry.unicode_mode
- Changed:
       - ZEND_STR_TYPE -> IS_UNICODE
       - convert_to_text -> convert_to_unicode
       - convert_to_text_ex -> convert_to_unicode_ex

(Felipe, Steph)
2009-03-26 20:02:53 +00:00
Arnaud Le Blanc
f6d76ad89a Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer()
performance degraded after fix of bug 44607).
2009-03-19 17:54:28 +00:00
Marcus Boerger
d4f5b3f0a9 - This is PHP 6 - if this ... ever gets out 2009-03-10 23:40:06 +00:00
Felipe Pena
57470a9bfd - Fixed bug #47037 (No error when using fopen with emty string)
Patch by Cristian Rodriguez R.
2009-01-08 18:43:12 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Lars Strojny
7611a5d984 MFB: If a wrapper could not be found it is either a typo or a configuration issue. But in both cases it is critical enough to warn the user. [DOC] (?) 2008-12-14 16:27:30 +00:00
David Soria Parra
e61a107e8b Revert fix for 43782, as it caused problems.
[DOC] We better document the issue at it is.
2008-11-24 15:35:03 +00:00
Arnaud Le Blanc
fc938b54c7 Fixed stream_get_contents() when using $maxlength and socket is not
closed. indeyets@php.net on #46049.
2008-11-11 01:55:19 +00:00
Arnaud Le Blanc
2e32876eaa Fixed stream_get_line() to behave as documented on non-blocking streams 2008-11-04 17:05:17 +00:00
Arnaud Le Blanc
fc62c1ff0a Fixed bug #44607 (stream_get_line unable to correctly identify the
"ending" in the stream content)
2008-11-03 23:28:45 +00:00
Arnaud Le Blanc
0bed5602ee Fixed bug #43353 (wrong detection of 'data' wrapper causes notice) 2008-11-03 15:47:05 +00:00
Greg Beaver
ae229cb860 MF52 fix Bug #46147: after stream seek, appending stream filter reads incorrect data 2008-09-22 01:26:38 +00:00
David Soria Parra
edc3fff0ff Fixed bug #43782 (feof() does not detect timeout on socket)
# Poll returns 0 if it times out.
# We check for 0 and use the user set timeout in set_options by passing -1.
2008-08-26 16:06:23 +00:00
Antony Dovgal
35f366273f increase context refcount before open() to avoid crash when open() fails and destroys the context 2008-08-06 09:03:36 +00:00
Antony Dovgal
ca0a6ec295 not all stream wrappers use context, so no need to addref in all cases 2008-07-11 12:40:20 +00:00
Antony Dovgal
3519ed9e31 manage references of stream context properly 2008-07-11 10:24:29 +00:00
Dmitry Stogov
00ea3108ea closeder/readdir/rewinddir must work only with directories 2008-06-11 09:01:44 +00:00
Stanislav Malyshev
dcd1cd8002 with unicode buffers, positions are in uchars 2008-06-08 18:21:59 +00:00
Greg Beaver
2b41209dfb MFB: fix erroneous use of php_resolve_path in _php_stream_wrapper_open_ex - this breaks require/include for all extensions that intercept zend_resolve_path 2008-04-28 22:40:10 +00:00
Greg Beaver
e8ac7c11d1 MFB: Fixed potentially confusing error message on failure when no errors are logged 2008-04-28 22:37:45 +00:00
Dmitry Stogov
977cc79398 Added ability to use stream wrappers in include_path 2008-03-27 10:33:52 +00:00
Antony Dovgal
4c7b5a89ba Change streams to not use mmap() when reading files (aka copying to memory).
There are two problems with mmap() in this case:
1) there is no performance gain since we allocate the memory anyways;
2) memcpy() may crash if somebody truncates this file at the same moment
(see http://dev.daylessday.org/diff/mmap.phps for example);

It seems to work fine with fpassthru(), though why it is so should be investigated.

Thanks to Andrey Vasilishin for the report and Anight for pressing this through =)
2008-03-24 16:28:08 +00:00
Greg Beaver
184e934511 use correct macro 2008-01-13 22:55:02 +00:00
Greg Beaver
e54eb5513e clarify error message on why opening a stream wrapper failed for allow_url_include/allow_url_fopen, add test for allow_url_fopen 2008-01-12 15:50:17 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Antony Dovgal
21fb4c1030 apply correct fix for bug #43522
fix Unicode streams too this time
2007-12-29 10:50:12 +00:00
Ilia Alshanetsky
d963eaffcc MFB: Fixed bug #43522 (stream_get_line() eats additional characters) 2007-12-10 14:19:20 +00:00
Marcus Boerger
c26e0d8ee7 - MFB ws 2007-11-06 10:54:29 +00:00
Dmitry Stogov
922f3d5512 Fixed wrong warning 2007-07-11 14:32:54 +00:00
Dmitry Stogov
f766275b7a Added ability to create local or remote (URL) user streams
Local user streams must not be able to open(), URLs if allow_url_include is off
Implemented new function stream_is_local()
[
- stream_wrapper_register() extended with additional optional argument "flags"
  of type long. This time only one flag is implemented - STREAM_IS_URL, that
  means that userstream wrapper is remote (URL). By default stream is local.
- stream_is_local() is a new function that accepts stream and tell if this
  stream is local or remote (URL)
]
2007-07-03 10:22:55 +00:00
Dmitry Stogov
0ddb071abb Fixed bug #41304 (compress.zlib temp files left) 2007-05-08 12:08:41 +00:00
Sara Golemon
98e832d29e Fix handling over overridden file:// wrapper 2007-03-06 20:04:05 +00:00
Marcus Boerger
ff3a914147 -A stream wrapper might only allow directory access 2007-03-03 18:59:53 +00:00
Antony Dovgal
30dacafa72 implement PHP_STREAM_FLAG_NO_CLOSE and avoid hacks in plain wrapper 2007-02-21 21:56:45 +00:00
Sara Golemon
cc1b19cf0e Expand allow_url_fopen/allow_url_include functionality 2007-01-24 21:43:47 +00:00
Marcus Boerger
1c60406349 - Add more unicode stuff 2007-01-16 20:36:04 +00:00
Marcus Boerger
99bd9f758a - Help streams debugging 2007-01-15 22:19:33 +00:00
Antony Dovgal
902e6583d9 add trailing '\0' to stream hashes 2007-01-15 17:06:52 +00:00
Sara Golemon
53333166fc Add convenience function for openeing files with unicode names 2007-01-10 22:43:17 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Antony Dovgal
e2070c4360 eliminate a couple of compile warnings 2006-11-09 01:06:45 +00:00
Hannes Magnusson
176b72284c Error message clean up
(patch by Matt W (php_lists -AT- realpain.com))
2006-10-08 13:34:24 +00:00