X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_send_api.c;h=1082e296460651f289dae088a558421e7505bf8b;hp=319c7d6285a8c9da350e12a509c0bf8844a3f06f;hb=refs%2Fheads%2Fv1.7.x;hpb=b6e5882dda739c665464331514ea7a54f568d814 diff --git a/http_send_api.c b/http_send_api.c index 319c7d6..1082e29 100644 --- a/http_send_api.c +++ b/http_send_api.c @@ -34,12 +34,16 @@ static inline void _http_flush(void *nothing, const char *data, size_t data_len /* we really only need to flush when throttling is enabled, because we push the data as fast as possible anyway if not */ if (HTTP_G->send.throttle_delay >= HTTP_DIFFSEC) { +#if defined(PHP_VERSION_ID) && (PHP_VERSION_ID >= 50399) + php_output_end_all(TSRMLS_C); +#else if (OG(ob_nesting_level)) { php_end_ob_buffer(1, 1 TSRMLS_CC); } if (!OG(implicit_flush)) { sapi_flush(TSRMLS_C); } +#endif http_sleep(HTTP_G->send.throttle_delay); } }