Go to the source code of this file.
#define CD_PARAM_FILENAME 2 |
#define DEFAULT_FILE_EXTRACT_LIMIT 16 |
Enumerator |
---|
STATE_INIT |
Initial state, after the parser has been created but before the boundary initialized.
|
STATE_DATA |
Processing data, waiting for a new line (which might indicate a new boundary).
|
STATE_BOUNDARY |
Testing a potential boundary.
|
STATE_BOUNDARY_IS_LAST1 |
Checking the first byte after a boundary.
|
STATE_BOUNDARY_IS_LAST2 |
Checking the second byte after a boundary.
|
STATE_BOUNDARY_EAT_LWS |
Consuming linear whitespace after a boundary.
|
STATE_BOUNDARY_EAT_LWS_CR |
Used after a CR byte is detected in STATE_BOUNDARY_EAT_LWS.
|
Enumerator |
---|
MODE_LINE |
When in line mode, the parser is handling part headers.
|
MODE_DATA |
When in data mode, the parser is consuming part data.
|
Creates a new Multipart part.
- Parameters
-
- Returns
- New part instance, or NULL on memory allocation failure.
Destroys a part.
- Parameters
-
[in] | part | |
[in] | gave_up_data | |
Finalizes part processing.
- Parameters
-
- Returns
- HTP_OK on success, HTP_ERROR on failure.
Handles part data.
- Parameters
-
[in] | part | |
[in] | data | |
[in] | len | |
[in] | is_line | |
- Returns
- HTP_OK on success, HTP_ERROR on failure.
Parses the Content-Disposition part header.
- Parameters
-
- Returns
- HTP_OK on success (header found and parsed), HTP_DECLINED if there is no C-D header or if it could not be processed, and HTP_ERROR on fatal error.
Processes part headers.
- Parameters
-
- Returns
- HTP_OK on success, HTP_ERROR on failure.
int htp_mpartp_is_boundary_character |
( |
int |
c | ) |
|
Parses one part header.
- Parameters
-
[in] | part | |
[in] | data | |
[in] | len | |
- Returns
- HTP_OK on success, HTP_DECLINED on parsing error, HTP_ERROR on fatal error.