TSRMLS_FETCH_FROM_CTX(body->ts);
/* NOFIXME: shows leakinfo in DEBUG mode */
zend_list_delete(body->stream_id);
- STR_FREE(body->boundary);
+ PTR_FREE(body->boundary);
efree(body);
}
*body_ptr = NULL;
}
if (!first_boundary) {
+ int st;
/* this is not the first boundary, read rest of this message */
php_http_buffer_append(&arg->buf, buf, real_boundary - buf);
- php_http_message_parser_parse(arg->parser, &arg->buf, 0, &arg->parser->message);
+ st=php_http_message_parser_parse(arg->parser, &arg->buf, 0, &arg->parser->message);
+ //fprintf(stderr, "1 st=%d\n",st);
}
/* move after the boundary */
/* let there be room for the next boundary */
if (len > arg->boundary_len) {
+ int st;
consumed += len - arg->boundary_len;
php_http_buffer_append(&arg->buf, buf, len - arg->boundary_len);
- php_http_message_parser_parse(arg->parser, &arg->buf, 0, &arg->parser->message);
+ st=php_http_message_parser_parse(arg->parser, &arg->buf, 0, &arg->parser->message);
+ //fprintf(stderr, "2 st=%d\n", st);
}
arg->consumed += consumed;
php_http_buffer_free(&tmp);
php_http_message_parser_free(&arg.parser);
php_http_buffer_dtor(&arg.buf);
- STR_FREE(arg.boundary_str);
+ PTR_FREE(arg.boundary_str);
return msg;
}