| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The file() function is now also binary safe.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with regard to sockets. The behaviour should be aligned with PHP 4.2 now.
This has been verified to some degree.
If the underlying stream operations block when no new data is readable,
we need to take extra precautions.
If there is buffered data available, we check for a EOL. If it exists,
we pass the data immediately back to the caller. This saves a call
to the read implementation and will not block where blocking
is not necessary at all.
If the stream buffer contains more data than the caller requested,
we can also avoid that costly step and simply return that data.
|
|
|
|
|
|
| |
Add options for timeout and chunk size; previously these were only
set-able for socket streams.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Juggle some includes/definitions.
Tidy up streams use in ext/standard/file.c
|
|
|
|
|
|
| |
stream so that flex will get on nicely with the content.
# untested; theoretically it should work just fine.
|
| |
|
|
|
|
|
|
| |
Tidy up user streams even more.
Make test case quite aggressive.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Lets stick to a single category of "http" for the "user_agent"
context override.
|
| |
|
|
|
|
|
|
| |
flush before the stream is closed. This allows filters to finish a chunk
and write footers etc.
|
|
|
|
|
| |
Unify error messages for ext/ftp. (which was using php_stream_error).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Filters can be stacked onto a stream; more details will follow in docs and
on php-dev.
Implement "string.rot13" filter
Allows the following script:
$fp = fopen("file.txt", "r");
stream_filter_prepend($fp, "string.rot13");
// File contents will be subject to a rot13 transformation before
// being output.
fpassthru($fp);
fclose($fp);
|
|
|
|
|
|
|
|
|
|
|
| |
php_stream_set_option which can be used in a similar way as ioctl()
to set options for streams.
Current options include buffering and blocking support.
o Buffer control is support for stdio based streams.
o Blocking/non-blocking is supported for stdio and socket based streams.
|
|
|
|
|
| |
if a filename is a URL and thus if safe-mode checks should be skipped.
|
|
|
|
|
|
| |
function... (Thanks Marcus!)
Add a convenience macro for importing a stream from a zval.
|
|
|
|
|
|
|
|
| |
and warnings (some of which are bogus) when there are problems opening
streams.
Implement sanity check on the mode used to open ftp and http connections.
This fixes Bug 12004.
|
| |
|
|
|
|
|
| |
what streams are currently registered.
|
|
|
|
|
|
|
| |
Add/amend debugging code for sockets.
Add a flag that will help the http wrapper optimize itself when
it is not being used for include/require.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
| |
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
|
|
|
|
|
| |
# What was phase 2?
|