#include "bstr.h"
#include "dslib.h"
#include "htp.h"
Go to the source code of this file.
Detailed Description
Macro Definition Documentation
#define HTP_MULTIPART_MIME_TYPE "multipart/form-data" |
#define MULTIPART_DEFAULT_FILE_EXTRACT_LIMIT 16 |
#define MULTIPART_MODE_DATA 1 |
#define MULTIPART_MODE_LINE 0 |
#define MULTIPART_PART_EPILOGUE 4 |
#define MULTIPART_PART_FILE 2 |
#define MULTIPART_PART_PREAMBLE 3 |
#define MULTIPART_PART_TEXT 1 |
#define MULTIPART_PART_UNKNOWN 0 |
#define MULTIPART_STATE_BOUNDARY 2 |
#define MULTIPART_STATE_BOUNDARY_EAT_LF 5 |
#define MULTIPART_STATE_BOUNDARY_IS_LAST1 3 |
#define MULTIPART_STATE_BOUNDARY_IS_LAST2 4 |
#define MULTIPART_STATE_DATA 1 |
Typedef Documentation
Function Documentation
Creates new multipart part.
- Parameters:
-
Destroys multipart part.
- Parameters:
-
Finalizes part processing.
- Parameters:
-
int htp_mpart_part_receive_data |
( |
htp_mpart_part_t * |
part, |
|
|
unsigned char * |
data, |
|
|
size_t |
len, |
|
|
int |
line |
|
) |
| |
Creates a new multipart/form-data parser.
- Parameters:
-
- Returns:
- New parser, or NULL on memory allocation failure.
Destroys a multipart/form-data parser.
- Parameters:
-
int htp_mpartp_extract_boundary |
( |
bstr * |
content_type, |
|
|
char ** |
boundary |
|
) |
| |
Extract boundary from the supplied Content-Type request header. The extracted boundary will be allocated on heap.
- Parameters:
-
- Returns:
- rc
Finalize parsing.
- Parameters:
-
int htp_mpartp_parse |
( |
htp_mpartp_t * |
mpartp, |
|
|
unsigned char * |
data, |
|
|
size_t |
len |
|
) |
| |
Parses a chunk of multipart/form-data data. This function should be called as many times as necessary until all data has been consumed.
- Parameters:
-
- Returns:
- Status indicator
int htp_mpartp_run_request_file_data_hook |
( |
htp_mpart_part_t * |
part, |
|
|
unsigned char * |
data, |
|
|
size_t |
len |
|
) |
| |