- char range_header_str[256];
- size_t range_header_len;
-
- range_header_len = snprintf(range_header_str, sizeof(range_header_str), "Content-Range: bytes %ld-%ld/%zu", Z_LVAL_PP(begin), Z_LVAL_PP(end), data_size);
- http_send_status_header_ex(206, range_header_str, range_header_len, 1);
+ phpstr header;
+
+ phpstr_init(&header);
+ phpstr_appendf(&header, "Content-Range: bytes %ld-%ld/%zu", Z_LVAL_PP(begin), Z_LVAL_PP(end), data_size);
+ phpstr_fix(&header);
+ http_send_status_header_ex(206, PHPSTR_VAL(&header), PHPSTR_LEN(&header), 1);
+ phpstr_dtor(&header);