Added htparser_get_content_pending for fetching bytes left to process.

This commit is contained in:
Mark Ellzey 2012-12-26 12:35:48 -05:00
parent bb6cdac900
commit 28710f8401
2 changed files with 6 additions and 0 deletions

View file

@ -423,6 +423,11 @@ htparser_set_userdata(htparser * p, void * ud) {
p->userdata = ud;
}
uint64_t
htparser_get_content_pending(htparser * p) {
return p->content_len;
}
uint64_t
htparser_get_content_length(htparser * p) {
return p->orig_content_len;

View file

@ -101,6 +101,7 @@ unsigned char htparser_get_minor(htparser *);
unsigned char htparser_get_multipart(htparser *);
unsigned int htparser_get_status(htparser *);
uint64_t htparser_get_content_length(htparser *);
uint64_t htparser_get_content_pending(htparser *);
uint64_t htparser_get_total_bytes_read(htparser *);
htpparse_error htparser_get_error(htparser *);
const char * htparser_get_strerror(htparser *);