Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added htparser_get_content_pending for fetching bytes left to process.

  • Loading branch information...
commit 28710f8401e481ba67ca46a69378804dd3b5e293 1 parent bb6cdac
Mark Ellzey authored
Showing with 6 additions and 0 deletions.
  1. +5 −0 htparse/htparse.c
  2. +1 −0  htparse/htparse.h
5 htparse/htparse.c
View
@@ -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;
}
1  htparse/htparse.h
View
@@ -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 *);
Please sign in to comment.
Something went wrong with that request. Please try again.