return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
}
+#ifndef ZEND_ENGINE_2
+# define OnUpdateLong OnUpdateInt
+#endif
+
PHP_INI_BEGIN()
HTTP_PHP_INI_ENTRY("http.allowed_methods", "", PHP_INI_ALL, http_update_allowed_methods, request.methods.allowed)
HTTP_PHP_INI_ENTRY("http.cache_log", "", PHP_INI_ALL, OnUpdateString, log.cache)
PHP_HTTP_API void _http_ob_etaghandler(char *output, uint output_len,
char **handled_output, uint *handled_output_len, int mode TSRMLS_DC)
{
- char etag[41] = { 0 };
- unsigned char digest[20];
-
if (mode & PHP_OUTPUT_HANDLER_START) {
if (HTTP_G(etag).started) {
http_error(HE_WARNING, HTTP_E_RUNTIME, "ob_etaghandler can only be used once");
PHP_FUNCTION(http_test)
{
- ulong idx;
- char *key;
- zval **data;
- FOREACH_HASH_KEYVAL(&EG(symbol_table), key, idx, data) {
- convert_to_string_ex(data);
- fprintf(stderr, "\t %s => %s\n", key, Z_STRVAL_PP(data));
- }
}
/*
zval *c;
const char *continue_at = NULL;
- /* message has content-length header */
- if (c = http_message_header(msg, "Content-Length")) {
- long len = atol(Z_STRVAL_P(c));
- phpstr_from_string_ex(PHPSTR(msg), body, len);
- continue_at = body + len;
- } else
-
/* message has chunked transfer encoding */
if (c = http_message_header(msg, "Transfer-Encoding")) {
if (!strcasecmp("chunked", Z_STRVAL_P(c))) {
}
} else
+ /* message has content-length header */
+ if (c = http_message_header(msg, "Content-Length")) {
+ long len = atol(Z_STRVAL_P(c));
+ phpstr_from_string_ex(PHPSTR(msg), body, len);
+ continue_at = body + len;
+ } else
+
/* message has content-range header */
if (c = http_message_header(msg, "Content-Range")) {
ulong start = 0, end = 0;
#ifdef HAVE_LIBMHASH
default:
- if ((mode < 0) || (mode > mhash_count()) || (!(ctx = mhash_init(mode)))) {
+ if ((mode < 0) || ((ulong)mode > mhash_count()) || (!(ctx = mhash_init(mode)))) {
http_error_ex(HE_ERROR, HE_RUNTIME, "Invalid ETag mode: %ld", mode);
}
break;