-
- if (SUCCESS == php_stream_stat(in, &ssb)) {
- php_http_message_body_appendf(
- body,
- "Content-Length: %zu" PHP_HTTP_CRLF
- "" PHP_HTTP_CRLF,
- ssb.sb.st_size
- );
- } else {
- php_http_message_body_append(
- body,
- ZEND_STRL(
- "Transfer-Encoding: chunked" PHP_HTTP_CRLF
- "" PHP_HTTP_CRLF
- )
- );
-
- if ((tef = php_http_filter_factory.create_filter("http.chunked_encode", NULL, 0 TSRMLS_CC))) {
- php_stream_filter_append(&in->readfilters, tef);
- }
- }
-