Multipart parsing improvements.

This commit is contained in:
ivanr
2007-08-17 15:47:33 +00:00
parent e275162463
commit baf6f59dff
3 changed files with 200 additions and 24 deletions

View File

@@ -61,9 +61,10 @@ struct multipart_data {
apr_array_header_t *parts;
/* mime boundary used to detect when
* parts end and new begin
* parts end and begin
*/
char *boundary;
int boundary_count;
/* internal buffer and other variables
* used while parsing
@@ -84,7 +85,7 @@ struct multipart_data {
/* part parsing state; 0 means we are reading
* headers, 1 means we are collecting data
*/
int mpp_state;
int mpp_state;
/* because of the way this parsing algorithm
* works we hold back the last two bytes of
@@ -93,18 +94,19 @@ struct multipart_data {
* a boundary; the first byte is an indicator
* 0 - no content, 1 - two data bytes available
*/
char reserve[4];
int seen_data;
int is_complete;
int flag_error;
int flag_data_before;
int flag_data_after;
int flag_header_folding;
int flag_boundary_quoted;
int flag_lf_line;
int flag_unmatched_boundary;
char reserve[4];
int seen_data;
int is_complete;
int flag_error;
int flag_data_before;
int flag_data_after;
int flag_header_folding;
int flag_boundary_quoted;
int flag_lf_line;
int flag_unmatched_boundary;
int flag_boundary_whitespace;
};