#ifdef ZEND_ENGINE_2
# include "ext/standard/php_http.h"
-#else
- #include "http_build_query.c"
#endif
#include "php_http.h"
#include "php_http_api.h"
+#include "php_http_std_defs.h"
ZEND_DECLARE_MODULE_GLOBALS(http)
static int check_month(char *month);
static int check_tzone(char *tzone);
-
static int http_ob_stack_get(php_ob_buffer *, php_ob_buffer **);
/* {{{ static int http_sort_q(const void *, const void *) */
if (php_stream_seek(s, begin, SEEK_SET)) {
return FAILURE;
}
- buf = (char *) ecalloc(1, HTTP_BUF_SIZE);
+ buf = (char *) ecalloc(1, HTTP_SENDBUF_SIZE);
/* read into buf and write out */
- while ((len -= HTTP_BUF_SIZE) >= 0) {
- if (!(read = php_stream_read(s, buf, HTTP_BUF_SIZE))) {
+ while ((len -= HTTP_SENDBUF_SIZE) >= 0) {
+ if (!(read = php_stream_read(s, buf, HTTP_SENDBUF_SIZE))) {
efree(buf);
return FAILURE;
}
/* read & write left over */
if (len) {
- if (read = php_stream_read(s, buf, HTTP_BUF_SIZE + len)) {
+ if (read = php_stream_read(s, buf, HTTP_SENDBUF_SIZE + len)) {
if (read - php_body_write(buf, read TSRMLS_CC)) {
efree(buf);
return FAILURE;
PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC)
{
struct tm *gmtime, tmbuf;
- char *date = ecalloc(1, 31);
-
- gmtime = php_gmtime_r(&t, &tmbuf);
- snprintf(date, 30,
- "%s, %02d %s %04d %02d:%02d:%02d GMT",
- days[gmtime->tm_wday], gmtime->tm_mday,
- months[gmtime->tm_mon], gmtime->tm_year + 1900,
- gmtime->tm_hour, gmtime->tm_min, gmtime->tm_sec
- );
- return date;
+
+ if (gmtime = php_gmtime_r(&t, &tmbuf)) {
+ char *date = ecalloc(1, 31);
+ snprintf(date, 30,
+ "%s, %02d %s %04d %02d:%02d:%02d GMT",
+ days[gmtime->tm_wday], gmtime->tm_mday,
+ months[gmtime->tm_mon], gmtime->tm_year + 1900,
+ gmtime->tm_hour, gmtime->tm_min, gmtime->tm_sec
+ );
+ return date;
+ }
+
+ return NULL;
}
/* }}} */
/* a digit */
int val;
char *end;
- if((seconds == -1) && (3 == sscanf(date, "%02d:%02d:%02d", &hours, &minutes, &seconds))) {
+ if ((seconds == -1) &&
+ (3 == sscanf(date, "%02d:%02d:%02d", &hours, &minutes, &seconds))) {
/* time stamp! */
date += 8;
found = 1;
else {
val = (int) strtol(date, &end, 10);
- if ((tz_offset == -1) && ((end - date) == 4) && (val < 1300) && (indate < date) && ((date[-1] == '+' || date[-1] == '-'))) {
+ if ((tz_offset == -1) && ((end - date) == 4) && (val < 1300) &&
+ (indate < date) && ((date[-1] == '+' || date[-1] == '-'))) {
/* four digits and a value less than 1300 and it is preceeded with
a plus or minus. This is a time zone indication. */
found = 1;
}
/* }}} */
-/* {{{ inline char *http_etag(void *, size_t, http_send_mode) */
-PHP_HTTP_API inline char *_http_etag(const void *data_ptr, const size_t data_len,
+/* {{{ char *http_etag(void *, size_t, http_send_mode) */
+PHP_HTTP_API char *_http_etag(const void *data_ptr, const size_t data_len,
const http_send_mode data_mode TSRMLS_DC)
{
char ssb_buf[128] = {0};
}
/* }}} */
-/* {{{ inline http_lmod(void *, http_send_mode) */
-PHP_HTTP_API inline time_t _http_lmod(const void *data_ptr, const http_send_mode data_mode TSRMLS_DC)
+/* {{{ time_t http_lmod(void *, http_send_mode) */
+PHP_HTTP_API time_t _http_lmod(const void *data_ptr, const http_send_mode data_mode TSRMLS_DC)
{
switch (data_mode)
{
}
/* }}} */
-/* {{{inline int http_is_range_request(void) */
-PHP_HTTP_API inline int _http_is_range_request(TSRMLS_D)
-{
- return zend_hash_exists(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]),
- "HTTP_RANGE", sizeof("HTTP_RANGE"));
-}
-/* }}} */
-
-/* {{{ inline STATUS http_send_status(int) */
-PHP_HTTP_API inline STATUS _http_send_status(const int status TSRMLS_DC)
-{
- int s = status;
- return sapi_header_op(SAPI_HEADER_SET_STATUS, (void *) s TSRMLS_CC);
-}
-/* }}} */
-
-/* {{{ inline STATUS http_send_header(char *) */
-PHP_HTTP_API inline STATUS _http_send_header(const char *header TSRMLS_DC)
-{
- return http_send_status_header(0, header);
-}
-/* }}} */
-
-/* {{{ inline STATUS http_send_status_header(int, char *) */
-PHP_HTTP_API inline STATUS _http_send_status_header(const int status, const char *header TSRMLS_DC)
+/* {{{ STATUS http_send_status_header(int, char *) */
+PHP_HTTP_API STATUS _http_send_status_header(const int status, const char *header TSRMLS_DC)
{
sapi_header_line h = {(char *) header, strlen(header), status};
return sapi_header_op(SAPI_HEADER_REPLACE, &h TSRMLS_CC);
}
/* }}} */
-/* {{{ inline zval *http_get_server_var(char *) */
-PHP_HTTP_API inline zval *_http_get_server_var(const char *key TSRMLS_DC)
+/* {{{ zval *http_get_server_var(char *) */
+PHP_HTTP_API zval *_http_get_server_var(const char *key TSRMLS_DC)
{
zval **var;
if (SUCCESS == zend_hash_find(
/* {{{ STATUS http_send_last_modified(int) */
PHP_HTTP_API STATUS _http_send_last_modified(const time_t t TSRMLS_DC)
{
- char modified[96] = "Last-Modified: ", *date;
- date = http_date(t);
- strcat(modified, date);
- efree(date);
+ char *date = NULL;
+ if (date = http_date(t)) {
+ char modified[96] = "Last-Modified: ";
+ strcat(modified, date);
+ efree(date);
- /* remember */
- HTTP_G(lmod) = t;
+ /* remember */
+ HTTP_G(lmod) = t;
- return http_send_header(modified);
+ return http_send_header(modified);
+ }
+ return FAILURE;
}
/* }}} */
}
/* walk through the supported array */
- for ( zend_hash_internal_pointer_reset(Z_ARRVAL_P(supported));
- SUCCESS == zend_hash_get_current_data(
- Z_ARRVAL_P(supported), (void **) &zsupp);
- zend_hash_move_forward(Z_ARRVAL_P(supported))) {
+ FOREACH_VAL(supported, zsupp) {
if (!strcasecmp(Z_STRVAL_PP(zsupp), Z_STRVAL_PP(zentry))) {
add_assoc_double(zentries, Z_STRVAL_PP(zsupp), qual);
break;
}
/* }}} */
-/* {{{ http_range_status http_get_request_ranges(zval *zranges, size_t) */
-PHP_HTTP_API http_range_status _http_get_request_ranges(zval *zranges,
+/* {{{ http_range_status http_get_request_ranges(HashTable *ranges, size_t) */
+PHP_HTTP_API http_range_status _http_get_request_ranges(HashTable *ranges,
const size_t length TSRMLS_DC)
{
zval *zrange;
array_init(zentry);
add_index_long(zentry, 0, begin);
add_index_long(zentry, 1, end);
- add_next_index_zval(zranges, zentry);
+ zend_hash_next_index_insert(ranges, &zentry, sizeof(zval *), NULL);
begin = -1;
end = -1;
}
/* }}} */
-/* {{{ STATUS http_send_ranges(zval *, void *, size_t, http_send_mode) */
-PHP_HTTP_API STATUS _http_send_ranges(zval *zranges, const void *data, const size_t size, const http_send_mode mode TSRMLS_DC)
+/* {{{ STATUS http_send_ranges(HashTable *, void *, size_t, http_send_mode) */
+PHP_HTTP_API STATUS _http_send_ranges(HashTable *ranges, const void *data, const size_t size, const http_send_mode mode TSRMLS_DC)
{
- int c;
long **begin, **end;
zval **zrange;
- /* Send HTTP 206 Partial Content */
- http_send_status(206);
-
/* single range */
- if ((c = zend_hash_num_elements(Z_ARRVAL_P(zranges))) == 1) {
+ if (zend_hash_num_elements(ranges) == 1) {
char range_header[256] = {0};
- zend_hash_index_find(Z_ARRVAL_P(zranges), 0, (void **) &zrange);
- zend_hash_index_find(Z_ARRVAL_PP(zrange), 0, (void **) &begin);
- zend_hash_index_find(Z_ARRVAL_PP(zrange), 1, (void **) &end);
+ if (SUCCESS != zend_hash_index_find(ranges, 0, (void **) &zrange) ||
+ SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(zrange), 0, (void **) &begin) ||
+ SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(zrange), 1, (void **) &end)) {
+ return FAILURE;
+ }
+
+ /* Send HTTP 206 Partial Content */
+ http_send_status(206);
/* send content range header */
snprintf(range_header, 255, "Content-Range: bytes %d-%d/%d", **begin, **end, size);
/* multi range */
else {
- int i;
char bound[23] = {0}, preface[1024] = {0},
multi_header[68] = "Content-Type: multipart/byteranges; boundary=";
+ /* Send HTTP 206 Partial Content */
+ http_send_status(206);
+
+ /* send multipart/byteranges header */
snprintf(bound, 22, "--%d%0.9f", time(NULL), php_combined_lcg(TSRMLS_C));
strncat(multi_header, bound + 2, 21);
http_send_header(multi_header);
/* send each requested chunk */
- for ( i = 0, zend_hash_internal_pointer_reset(Z_ARRVAL_P(zranges));
- i < c;
- i++, zend_hash_move_forward(Z_ARRVAL_P(zranges))) {
- if ( HASH_KEY_NON_EXISTANT == zend_hash_get_current_data(
- Z_ARRVAL_P(zranges), (void **) &zrange) ||
- SUCCESS != zend_hash_index_find(
- Z_ARRVAL_PP(zrange), 0, (void **) &begin) ||
- SUCCESS != zend_hash_index_find(
- Z_ARRVAL_PP(zrange), 1, (void **) &end)) {
+ FOREACH_HASH_VAL(ranges, zrange) {
+ if (SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(zrange), 0, (void **) &begin) ||
+ SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(zrange), 1, (void **) &end)) {
break;
}
}
/* write boundary once more */
- php_body_write(HTTP_CRLF, 2 TSRMLS_CC);
+ php_body_write(HTTP_CRLF, sizeof(HTTP_CRLF) - 1 TSRMLS_CC);
php_body_write(bound, strlen(bound) TSRMLS_CC);
+ php_body_write("--", 2 TSRMLS_CC);
return SUCCESS;
}
}
/* }}} */
-/* {{{ STATUS http_send(void *, sizezo_t, http_send_mode) */
+/* {{{ STATUS http_send(void *, size_t, http_send_mode) */
PHP_HTTP_API STATUS _http_send(const void *data_ptr, const size_t data_size,
const http_send_mode data_mode TSRMLS_DC)
{
if (!data_ptr) {
return FAILURE;
}
+ if (!data_size) {
+ return SUCCESS;
+ }
/* etag handling */
if (HTTP_G(etag_started)) {
) {
STATUS result = FAILURE;
- zval *zranges = NULL;
- MAKE_STD_ZVAL(zranges);
- array_init(zranges);
+ HashTable ranges;
+ zend_hash_init(&ranges, 0, NULL, ZVAL_PTR_DTOR, 0);
- switch (http_get_request_ranges(zranges, data_size))
+ switch (http_get_request_ranges(&ranges, data_size))
{
case RANGE_NO:
- zval_dtor(zranges);
- efree(zranges);
+ zend_hash_destroy(&ranges);
/* go ahead and send all */
break;
case RANGE_OK:
- result = http_send_ranges(zranges, data_ptr, data_size, data_mode);
- zval_dtor(zranges);
- efree(zranges);
+ result = http_send_ranges(&ranges, data_ptr, data_size, data_mode);
+ zend_hash_destroy(&ranges);
return result;
break;
case RANGE_ERR:
- zval_dtor(zranges);
- efree(zranges);
+ zend_hash_destroy(&ranges);
http_send_status(416);
return FAILURE;
break;
}
/* }}} */
-/* {{{ STATUS http_send_data(zval *) */
-PHP_HTTP_API STATUS _http_send_data(const zval *zdata TSRMLS_DC)
-{
- if (!Z_STRLEN_P(zdata)) {
- return SUCCESS;
- }
- if (!Z_STRVAL_P(zdata)) {
- return FAILURE;
- }
-
- return http_send(Z_STRVAL_P(zdata), Z_STRLEN_P(zdata), SEND_DATA);
-}
-/* }}} */
-
/* {{{ STATUS http_send_stream(php_stream *) */
-PHP_HTTP_API STATUS _http_send_stream(const php_stream *file TSRMLS_DC)
-{
- if (php_stream_stat((php_stream *) file, &HTTP_G(ssb))) {
- return FAILURE;
- }
-
- return http_send(file, HTTP_G(ssb).sb.st_size, SEND_RSRC);
-}
-/* }}} */
-
-/* {{{ STATUS http_send_file(zval *) */
-PHP_HTTP_API STATUS _http_send_file(const zval *zfile TSRMLS_DC)
+PHP_HTTP_API STATUS _http_send_stream_ex(php_stream *file,
+ zend_bool close_stream TSRMLS_DC)
{
- php_stream *file;
- STATUS ret;
+ STATUS status;
- if (!Z_STRLEN_P(zfile)) {
+ if ((!file) || php_stream_stat(file, &HTTP_G(ssb))) {
return FAILURE;
}
- if (!(file = php_stream_open_wrapper(Z_STRVAL_P(zfile), "rb",
- REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL))) {
- return FAILURE;
+ status = http_send(file, HTTP_G(ssb).sb.st_size, SEND_RSRC);
+
+ if (close_stream) {
+ php_stream_close(file);
}
- ret = http_send_stream(file);
- php_stream_close(file);
- return ret;
+ return status;
}
/* }}} */
/* }}} */
/* {{{ proto STATUS http_split_response_ex(char *, size_t, zval *, zval *) */
-PHP_HTTP_API STATUS _http_split_response_ex( char *response,
+PHP_HTTP_API STATUS _http_split_response_ex(char *response,
size_t response_len, zval *zheaders, zval *zbody TSRMLS_DC)
{
char *body = NULL;
char *header = response;
- while ((response - header + 4) < response_len) {
+ while (0 < (response_len - (response - header + 4))) {
if ( (*response++ == '\r') &&
(*response++ == '\n') &&
(*response++ == '\r') &&
/* {{{ void http_get_request_headers(zval *) */
PHP_HTTP_API void _http_get_request_headers(zval *array TSRMLS_DC)
{
- char *key;
+ char *key = NULL;
+ long idx = 0;
- for ( zend_hash_internal_pointer_reset(HTTP_SERVER_VARS);
- zend_hash_get_current_key(HTTP_SERVER_VARS, &key, NULL, 0) != HASH_KEY_NON_EXISTANT;
- zend_hash_move_forward(HTTP_SERVER_VARS)) {
- if (!strncmp(key, "HTTP_", 5)) {
+ FOREACH_HASH_KEY(HTTP_SERVER_VARS, key, idx) {
+ if (key && !strncmp(key, "HTTP_", 5)) {
zval **header;
zend_hash_get_current_data(HTTP_SERVER_VARS, (void **) &header);
add_assoc_stringl(array, pretty_key(key + 5, strlen(key) - 5, 1, 1), Z_STRVAL_PP(header), Z_STRLEN_PP(header), 1);
}
/* }}} */
+/* {{{ STATUS http_urlencode_hash_ex(HashTable *, int, char **, size_t *) */
+PHP_HTTP_API STATUS _http_urlencode_hash_ex(HashTable *hash, int override_argsep,
+ char *pre_encoded_data, size_t pre_encoded_len,
+ char **encoded_data, size_t *encoded_len TSRMLS_DC)
+{
+ smart_str qstr = {0};
+
+ if (override_argsep) {
+ HTTP_URL_ARGSEP_OVERRIDE;
+ }
+
+ if (pre_encoded_len && pre_encoded_data) {
+ smart_str_appendl(&qstr, pre_encoded_data, pre_encoded_len);
+ }
+
+ if (SUCCESS != php_url_encode_hash_ex(hash, &qstr, NULL, 0, NULL, 0, NULL, 0, NULL TSRMLS_CC)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't encode query data");
+ if (qstr.c) {
+ efree(qstr.c);
+ }
+ if (override_argsep) {
+ HTTP_URL_ARGSEP_RESTORE;
+ }
+ return FAILURE;
+ }
+
+ if (override_argsep) {
+ HTTP_URL_ARGSEP_RESTORE;
+ }
+
+ smart_str_0(&qstr);
+
+ *encoded_data = qstr.c;
+ if (encoded_len) {
+ *encoded_len = qstr.len;
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ STATUS http_auth_header(char *, char*) */
PHP_HTTP_API STATUS _http_auth_header(const char *type, const char *realm TSRMLS_DC)
{
}
/* }}} */
+#ifndef ZEND_ENGINE_2
+/* {{{ php_url_encode_hash
+ Author: Sara Golemon <pollita@php.net> */
+PHP_HTTP_API STATUS php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
+ const char *num_prefix, int num_prefix_len,
+ const char *key_prefix, int key_prefix_len,
+ const char *key_suffix, int key_suffix_len,
+ zval *type TSRMLS_DC)
+{
+ char *arg_sep = NULL, *key = NULL, *ekey, *newprefix, *p;
+ int arg_sep_len, key_len, ekey_len, key_type, newprefix_len;
+ ulong idx;
+ zval **zdata = NULL, *copyzval;
+
+ if (!ht) {
+ return FAILURE;
+ }
+
+ if (ht->nApplyCount > 0) {
+ /* Prevent recursion */
+ return SUCCESS;
+ }
+
+ arg_sep = INI_STR("arg_separator.output");
+ if (!arg_sep || !strlen(arg_sep)) {
+ arg_sep = HTTP_URL_ARGSEP_DEFAULT;
+ }
+ arg_sep_len = strlen(arg_sep);
+
+ for (zend_hash_internal_pointer_reset(ht);
+ (key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT;
+ zend_hash_move_forward(ht)
+ ) {
+ if (key_type == HASH_KEY_IS_STRING && key_len && key[key_len-1] == '\0') {
+ /* We don't want that trailing NULL */
+ key_len -= 1;
+ }
+
+#ifdef ZEND_ENGINE_2
+ /* handling for private & protected object properties */
+ if (key && *key == '\0' && type != NULL) {
+ char *tmp;
+
+ zend_object *zobj = zend_objects_get_address(type TSRMLS_CC);
+ if (zend_check_property_access(zobj, key TSRMLS_CC) != SUCCESS) {
+ /* private or protected property access outside of the class */
+ continue;
+ }
+ zend_unmangle_property_name(key, &tmp, &key);
+ key_len = strlen(key);
+ }
+#endif
+
+ if (zend_hash_get_current_data_ex(ht, (void **)&zdata, NULL) == FAILURE || !zdata || !(*zdata)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error traversing form data array.");
+ return FAILURE;
+ }
+ if (Z_TYPE_PP(zdata) == IS_ARRAY || Z_TYPE_PP(zdata) == IS_OBJECT) {
+ if (key_type == HASH_KEY_IS_STRING) {
+ ekey = php_url_encode(key, key_len, &ekey_len);
+ newprefix_len = key_suffix_len + ekey_len + key_prefix_len + 1;
+ newprefix = emalloc(newprefix_len + 1);
+ p = newprefix;
+
+ if (key_prefix) {
+ memcpy(p, key_prefix, key_prefix_len);
+ p += key_prefix_len;
+ }
+
+ memcpy(p, ekey, ekey_len);
+ p += ekey_len;
+ efree(ekey);
+
+ if (key_suffix) {
+ memcpy(p, key_suffix, key_suffix_len);
+ p += key_suffix_len;
+ }
+
+ *(p++) = '[';
+ *p = '\0';
+ } else {
+ /* Is an integer key */
+ ekey_len = spprintf(&ekey, 12, "%ld", idx);
+ newprefix_len = key_prefix_len + num_prefix_len + ekey_len + key_suffix_len + 1;
+ newprefix = emalloc(newprefix_len + 1);
+ p = newprefix;
+
+ if (key_prefix) {
+ memcpy(p, key_prefix, key_prefix_len);
+ p += key_prefix_len;
+ }
+
+ memcpy(p, num_prefix, num_prefix_len);
+ p += num_prefix_len;
+
+ memcpy(p, ekey, ekey_len);
+ p += ekey_len;
+ efree(ekey);
+
+ if (key_suffix) {
+ memcpy(p, key_suffix, key_suffix_len);
+ p += key_suffix_len;
+ }
+ *(p++) = '[';
+ *p = '\0';
+ }
+ ht->nApplyCount++;
+ php_url_encode_hash_ex(HASH_OF(*zdata), formstr, NULL, 0, newprefix, newprefix_len, "]", 1, (Z_TYPE_PP(zdata) == IS_OBJECT ? *zdata : NULL) TSRMLS_CC);
+ ht->nApplyCount--;
+ efree(newprefix);
+ } else if (Z_TYPE_PP(zdata) == IS_NULL || Z_TYPE_PP(zdata) == IS_RESOURCE) {
+ /* Skip these types */
+ continue;
+ } else {
+ if (formstr->len) {
+ smart_str_appendl(formstr, arg_sep, arg_sep_len);
+ }
+ /* Simple key=value */
+ smart_str_appendl(formstr, key_prefix, key_prefix_len);
+ if (key_type == HASH_KEY_IS_STRING) {
+ ekey = php_url_encode(key, key_len, &ekey_len);
+ smart_str_appendl(formstr, ekey, ekey_len);
+ efree(ekey);
+ } else {
+ /* Numeric key */
+ if (num_prefix) {
+ smart_str_appendl(formstr, num_prefix, num_prefix_len);
+ }
+ ekey_len = spprintf(&ekey, 12, "%ld", idx);
+ smart_str_appendl(formstr, ekey, ekey_len);
+ efree(ekey);
+ }
+ smart_str_appendl(formstr, key_suffix, key_suffix_len);
+ smart_str_appendl(formstr, "=", 1);
+ switch (Z_TYPE_PP(zdata)) {
+ case IS_STRING:
+ ekey = php_url_encode(Z_STRVAL_PP(zdata), Z_STRLEN_PP(zdata), &ekey_len);
+ break;
+ case IS_LONG:
+ case IS_BOOL:
+ ekey_len = spprintf(&ekey, 12, "%ld", Z_LVAL_PP(zdata));
+ break;
+ case IS_DOUBLE:
+ ekey_len = spprintf(&ekey, 48, "%.*G", (int) EG(precision), Z_DVAL_PP(zdata));
+ break;
+ default:
+ /* fall back on convert to string */
+ MAKE_STD_ZVAL(copyzval);
+ *copyzval = **zdata;
+ zval_copy_ctor(copyzval);
+ convert_to_string_ex(©zval);
+ ekey = php_url_encode(Z_STRVAL_P(copyzval), Z_STRLEN_P(copyzval), &ekey_len);
+ zval_ptr_dtor(©zval);
+ }
+ smart_str_appendl(formstr, ekey, ekey_len);
+ efree(ekey);
+ }
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+#endif /* !ZEND_ENDGINE_2 */
+
/* }}} public API */
/*