X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_functions.c;h=3ec05777fc273bbdacb68533fa97545a2403547c;hp=469dd946d6227d886625c455220796982d3fa24a;hb=8d25696948ed61d50c417275222117f43069ddd1;hpb=d23b45cea3f50c901c12a05f53eb3cfee594d0e4 diff --git a/http_functions.c b/http_functions.c index 469dd94..3ec0577 100644 --- a/http_functions.c +++ b/http_functions.c @@ -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))); }