- if (buckets_in->head) {
- php_http_buffer_t buf;
- out_avail = 1;
-
- php_http_buffer_init(&buf);
-
- /* fetch available bucket data */
- for (ptr = buckets_in->head; ptr; ptr = nxt) {
- nxt = ptr->next;
- if (bytes_consumed) {
- *bytes_consumed += ptr->buflen;
- }
-
- php_http_buffer_appendf(&buf, "%lx" PHP_HTTP_CRLF, (long unsigned int) ptr->buflen);
- php_http_buffer_append(&buf, ptr->buf, ptr->buflen);
- php_http_buffer_appends(&buf, PHP_HTTP_CRLF);
-
- /* pass through */
- NEW_BUCKET(PHP_HTTP_BUFFER_VAL(&buf), PHP_HTTP_BUFFER_LEN(&buf));
- /* reset */
- php_http_buffer_reset(&buf);
-
- php_stream_bucket_unlink(ptr TSRMLS_CC);
- php_stream_bucket_delref(ptr TSRMLS_CC);
+ php_http_buffer_init(&buf);
+
+ /* fetch available bucket data */
+ for (ptr = buckets_in->head; ptr; ptr = nxt) {
+ if (bytes_consumed) {
+ *bytes_consumed += ptr->buflen;