- switch (data_mode)
- {
- case SEND_DATA:
- http_etag_update(ctx, data_ptr, data_len);
- break;
-
- case SEND_RSRC:
- {
- if (php_stream_stat((php_stream *) data_ptr, &ssb)) {
- efree(ctx);
- return NULL;
- }
- ssb_len = snprintf(ssb_buf, 127, "%ld=%ld=%ld", ssb.sb.st_mtime, ssb.sb.st_ino, ssb.sb.st_size);
- http_etag_update(ctx, ssb_buf, ssb_len);
+ if (data_mode == SEND_DATA) {
+ http_etag_update(ctx, data_ptr, data_len);
+ } else {
+ STATUS ss = FAILURE;
+ php_stream_statbuf ssb;
+
+ if (data_mode == SEND_RSRC) {
+ ss = php_stream_stat((php_stream *) data_ptr, &ssb);
+ } else {
+ ss = php_stream_stat_path((char *) data_ptr, &ssb);