+ else {
+ int i;
+ char bound[23] = {0}, preface[1024] = {0},
+ multi_header[68] = "Content-Type: multipart/byteranges; boundary=";
+
+ snprintf(bound, 22, "--%d%0.9f", time(NULL), php_combined_lcg(TSRMLS_C));
+ strncat(multi_header, bound + 2, 21);
+ http_send_header(multi_header);
+
+ /* send each requested chunk */
+ for ( i = 0, zend_hash_internal_pointer_reset(Z_ARRVAL_P(zranges));
+ i < c;
+ i++, zend_hash_move_forward(Z_ARRVAL_P(zranges))) {
+ if ( HASH_KEY_NON_EXISTANT == zend_hash_get_current_data(
+ Z_ARRVAL_P(zranges), (void **) &zrange) ||
+ SUCCESS != zend_hash_index_find(
+ Z_ARRVAL_PP(zrange), 0, (void **) &begin) ||
+ SUCCESS != zend_hash_index_find(
+ Z_ARRVAL_PP(zrange), 1, (void **) &end)) {
+ break;
+ }