| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
closed),
#32171 (Userspace stream wrapper crashes PHP)
|
| |
|
|
|
|
|
|
| |
result in entire resource being copied.
The mmap brake is already present inside mmap_range() and is set to 1MB.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
filters which relates to the fix just applied for userspace wrappers.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
(else they won't be usable from C++ extensions)
|
|
|
|
| |
wrapper aware.
|
|
|
|
|
| |
# Should the LICENSE and Zend/LICENSE dates be updated too?
|
| |
|
|
|
|
|
|
| |
Move current rmdir()/rmdir() code to plain_wrappers.c
Implement mkdir()/rmdir() in ftp:// wrapper
|
|
|
|
|
|
|
| |
Move current rename() code to main/streams/plain_wrapper.c
Implement ftp/rename()
Implement userstreams/rename()
|
| |
|
|
|
|
|
| |
This enables fopen-wrappers support on stat() and related family calls.
|
|
|
|
|
|
| |
Liveness checks are used to validate persistent socket connects when they
are re-used.
|
|
|
|
|
| |
stream_get_meta_data().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
behavior/API is as follows:
1) To close a persistent use php_stream_pclose(), it will close the stream
and remove it from the persistent list.
2) Inside PHP code only explicit fclose() will close persistent streams,
all other actions such as unset() or assigning a value to stream handle
will not.
3) Regular streams can still be closed by either fclose(), unset() or an
assignment of a value to the stream handler.
|
| |
|
| |
|
| |
|
|
|
|
| |
plainfiles wrapper, explicitly set method NULL in other wrappers (for now), and rewrite unlink userland function to call into wrapper_ops
|
|
|
|
| |
*mode, int options, char **opened_path, php_stream_context *context) Z_TYPE_PP(zstream) can be either IS_RESOURCE (An already opened stream) or IS_STRING (a path to a stream to be opened)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usage:
php_stream *stream = php_stream_fopen("/path/to/file", "r+b", NULL,
STREAM_OPEN_PERSISTENT | ENFORCE_SAFE_MODE | REPORT_ERRORS);
the filename and mode are combined to form the hash key for the persistent
list; they must be identical for this same stream to be returned again in the
next request.
Calling php_stream_close() on a persistent stream *will* close it, as is
usual with all persistent resources in PHP/ZE.
This is deliberately *not* exposed to user-space PHP at this time.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
(currently only supports OpenSSL, but could support other SSL toolkits,
and other crypto transport protocols).
Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
removing the link-time requirement for ssl:// and https:// sockets and
streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
there are now a range of possible socket-type streams.
Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.
# I will be updating the win32 build to add the new files shortly
# after this commit.
|
|
|
|
|
| |
fixes a warning on unixware
|
|
|
|
|
|
|
| |
Allow PHP to automatically release locks on files when terminating the
stream.
Fixed bugs in the handling of the 3rd optional parameter to flock().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This breaks user-space filters (for the time being), and those
weird convert.* filters in ext/standard/filters.c
The filters stack has been separated into one chain for read and one chain
for write.
The user-space stream_filter_append() type functions currently only operate
on the read chain. They need extending to work with the write chain too.
|
|
|
|
|
|
| |
# Just when you thought you had learned your way around the streams code;
# I like to keep you all on your toes!
|
| |
|
|
|
|
|
|
| |
read either the specified number of bytes or until the ending string is
found).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
with Wez.
|
|
|
|
|
| |
#Agreed by Wez - I will use this mysel soon.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
buffers.
When selecting for read, the streams are examined; if any of them have
pending read data, no actual select(2) call is performed; instead the
streams with buffered data are returned; just like a regular select
call.
Prevent erroneous warning in stream_select when obtaining the fd.
|
|
|
|
|
|
|
|
|
|
|
| |
php_stream_gets is now a macro which calls php_stream_get_line. The latter
has an option argument to return the number of bytes in the line.
Functions like fgetcsv(), fgetss() can be made binary safe by calling
php_stream_get_line directly.
# HEADS UP: You will need to make clean after updating your CVS, as the
# binary signature has changed.
|