Permalink
Browse files

Added htparser_get_content_pending for fetching bytes left to process.

  • Loading branch information...
1 parent bb6cdac commit 28710f8401e481ba67ca46a69378804dd3b5e293 Mark Ellzey committed Dec 26, 2012
Showing with 6 additions and 0 deletions.
  1. +5 −0 htparse/htparse.c
  2. +1 −0 htparse/htparse.h
View
5 htparse/htparse.c
@@ -424,6 +424,11 @@ htparser_set_userdata(htparser * p, void * 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
1 htparse/htparse.h
@@ -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 *);

0 comments on commit 28710f8

Please sign in to comment.