- added INI setting http.force_exit which can be used to disable script termination
[m6w6/ext-http] / http_functions.c
index 469dd946d6227d886625c455220796982d3fa24a..3ec05777fc273bbdacb68533fa97545a2403547c 100644 (file)
@@ -137,9 +137,10 @@ PHP_FUNCTION(http_build_uri)
                } \
                \
                if (rs_array) { \
+                       HashPosition pos; \
                        zval **value; \
                         \
-                       FOREACH_VAL(supported, value) { \
+                       FOREACH_VAL(pos, supported, value) { \
                                convert_to_string_ex(value); \
                                add_assoc_double(rs_array, Z_STRVAL_PP(value), 1.0); \
                        } \
@@ -438,6 +439,8 @@ PHP_FUNCTION(http_cache_last_modified)
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &last_modified) != SUCCESS) {
                RETURN_FALSE;
        }
+       
+       HTTP_CHECK_HEADERS_SENT(RETURN_FALSE);
 
        t = (long) time(NULL);
 
@@ -485,6 +488,8 @@ PHP_FUNCTION(http_cache_etag)
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &etag, &etag_len) != SUCCESS) {
                RETURN_FALSE;
        }
+       
+       HTTP_CHECK_HEADERS_SENT(RETURN_FALSE);
 
        RETURN_SUCCESS(http_cache_etag(etag, etag_len, HTTP_DEFAULT_CACHECONTROL, lenof(HTTP_DEFAULT_CACHECONTROL)));
 }