Michael Wallner [Tue, 17 Sep 2013 08:50:49 +0000 (10:50 +0200)]
Merge branch 'slim-postdata'
* slim-postdata:
slim post data
add NEWS entry; add simple test
more precise condition
make this work in vc11 too
Use int64_t and atoll() after discussion with johannes
ws
Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files above 2G.
Provide more macros for handling of interned strings
* str_erealloc behaves like erealloc for normal strings, but will
use emalloc+memcpy for interned strings.
* str_estrndup behaves like estrndup for normal strings, but will
not copy interned strings.
* str_strndup behaves like zend_strndup for normal strings, but
will not copy interned strings.
* str_efree_rel behaves like efree_rel for normal strings, but
will not free interned strings.
* str_hash will return INTERNED_HASH for interned strings and
compute it using zend_hash_func for normal strings.
Small cleanup in class name resolution of compiler
* The fetch_type and check_ns_name parameters of
zend_resolve_class_name were unused and are now removed.
* ZEND_FETCH_CLASS_GLOBAL is no longer used (no code actually
checking for it).
* The checks for usage of "namespace" as class name were
unnecessary as that situation can't occur anyways.
Adam Harvey [Wed, 11 Sep 2013 21:11:29 +0000 (14:11 -0700)]
Request non-keep-alive connections by default in HTTP 1.1 requests.
As noted in FR #65634, at present we don't send a Connection request header
when the protocol version is set to 1.1, which means that RFC-compliant Web
servers should respond with keep-alive connections. Since there's no way of
reusing the HTTP connection at present, this simply means that PHP will appear
to hang until the remote server hits its connection timeout, which may be quite
some time.
This commit sends a "Connection: close" header by default when HTTP 1.1 (or
later) is requested by the user via the context options. It can be overridden
by specifying a Connection header in the context options. It isn't possible to
disable sending of the Connection header, but given "Connection: keep-alive" is
the same as the default HTTP 1.1 behaviour, I don't see this as a significant
issue — users who want to opt in for that still can.
As a note, although I've removed an efree(protocol_version), this doesn't
result in a memory leak: protocol_version is freed in the out: block at the end
of the function anyway, and there are no returns between the removed efree()
and the later call. Yes, I ran the tests with valgrind to check that. ☺
Implements FR #65634 (HTTP wrapper is very slow with protocol_version 1.1).
Adam Harvey [Tue, 10 Sep 2013 18:42:42 +0000 (11:42 -0700)]
Allow CURLOPT_FOLLOWLOCATION to be used with open_basedir.
Newer versions of libcurl prevent file:// location response headers by default,
which means that the open_basedir check is unnecessary — the fact
CURLOPT_REDIR_PROTOCOLS can't set CURLPROTO_FILE with open_basedir enabled
means that there's no possibility of breaching the open_basedir restriction,
and this allows HTTP redirects to be followed automatically.
Implements FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or
safe_mode).
Make oci_set_*($connection,...) errors retrievable via oci_error($connection).
Improve some error handling to produce error text on some rare edge cases.
Disambiguate the Oracle library function call return status values from ORA error numbers.
Review and unify error data types.
Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
Typo....
Add a XFAIL test for #64896
Implement phase 1 of rfc/incompat_ctx
Make use of direct returns in some places
Always pass return_value_ptr to internal functions
Nikita Popov [Mon, 26 Aug 2013 17:06:36 +0000 (19:06 +0200)]
Always pass return_value_ptr to internal functions
Previous some places passed return_value_ptr only if the function
returned by reference. Now return_value_ptr is always set, even
for functions returning by-value.
This allows you to return zvals without copying their contents. For
this purpose two new macros RETVAL_ZVAL_FAST and RETURN_ZVAL_FAST
are added:
RETVAL_ZVAL_FAST(zv); /* Analog to RETVAL_ZVAL(zv, 1, 0) */
RETURN_ZVAL_FAST(zv); /* Analog to RETURN_ZVAL(zv, 1, 0) */
These macros behave similarly to the non-FAST versions with
copy=1 and dtor=0, with the difference that the FAST versions
will try return the zval without copying by utilizing return_value_ptr.
Allow OCI8 to be DTrace-enabled independently of core PHP's DTrace
status. The proviso is OCI8 must be built "shared" when DTrace is
enabled. This implementation (i) works around an incomplete core PHP
solution for extension tracing (ii) avoid any issues with DOF section
location and the complexities of needing to merge all provider .d
files for static builds (iii) allows OCI8 to be DTrace-enabled when
doing PECL installs of OCI8 on PHP versions without core PHP DTrace
support.
This is an initial patch i.e. it will undergo further testing.
Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
Fixed bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
Update NEWS
Fixed bug #60598 (cli/apache sapi segfault on objects manipulation)
Remove ini dependency in test
Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var)
Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
Fixed compatibility with php-5.2
Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). (Terry Ellison)
Avoid compiler warning
Fix bug #65579 (Using traits with get_class_methods causes segfault).