projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
branch off v1 as R_1_7
[m6w6/ext-http]
/
http_cache_api.c
diff --git
a/http_cache_api.c
b/http_cache_api.c
index 4cc07b996da0e6fdb1d984b77bd13bf0b37af623..b6bc23714bd292882716ae66692118290b66095e 100644
(file)
--- a/
http_cache_api.c
+++ b/
http_cache_api.c
@@
-182,13
+182,24
@@
PHP_HTTP_API STATUS _http_cache_etag(const char *etag, size_t etag_len,
PHP_HTTP_API STATUS _http_start_ob_etaghandler(TSRMLS_D)
{
/* already running? */
PHP_HTTP_API STATUS _http_start_ob_etaghandler(TSRMLS_D)
{
/* already running? */
+#ifdef PHP_OUTPUT_NEWAPI
+ STATUS rv;
+
+ if (php_output_handler_conflict(ZEND_STRL("ob_etaghandler"), ZEND_STRL("ob_etaghandler") TSRMLS_CC)) {
+ return FAILURE;
+ }
+#else
if (php_ob_handler_used("ob_etaghandler" TSRMLS_CC)) {
http_error(HE_WARNING, HTTP_E_RUNTIME, "ob_etaghandler can only be used once");
return FAILURE;
}
if (php_ob_handler_used("ob_etaghandler" TSRMLS_CC)) {
http_error(HE_WARNING, HTTP_E_RUNTIME, "ob_etaghandler can only be used once");
return FAILURE;
}
-
+#endif
HTTP_G->etag.started = 1;
HTTP_G->etag.started = 1;
+#ifdef PHP_OUTPUT_NEWAPI
+ return php_output_start_internal(ZEND_STRL("ob_etaghandler"), _http_ob_etaghandler, HTTP_G->send.buffer_size, 0 TSRMLS_CC);
+#else
return php_start_ob_buffer_named("ob_etaghandler", HTTP_G->send.buffer_size, 0 TSRMLS_CC);
return php_start_ob_buffer_named("ob_etaghandler", HTTP_G->send.buffer_size, 0 TSRMLS_CC);
+#endif
}
PHP_HTTP_API zend_bool _http_interrupt_ob_etaghandler(TSRMLS_D)
}
PHP_HTTP_API zend_bool _http_interrupt_ob_etaghandler(TSRMLS_D)