#include <htp.h>
unsigned char* htp_cfg_t::bestfit_map |
The best-fit map to use to decode u-encoded characters.
unsigned char htp_cfg_t::bestfit_replacement_char |
The replacement character used when there is no best-fit mapping.
size_t htp_cfg_t::field_limit_hard |
Hard field limit length. If the parser encounters a line that's longer than this value it will give up parsing. Do note that the line limit is not the same thing as header length limit. Because of header folding, a header can end up being longer than the line limit.
size_t htp_cfg_t::field_limit_soft |
Soft field limit length. If this limit is reached the parser will issue a warning but continue to run.
Whether to generate the request_uri_normalized field.
Log hook, invoked every time the library wants to log.
Request hook, invoked after a complete request is seen.
Request body data hook, invoked every time body data is available. Each invocation will provide a htp_tx_data_t instance. Chunked data will be dechunked before the data is passed to this hook. Decompression is not currently implemented. At the end of the request body there will be a call with the data pointer set to NULL.
Request headers hook, invoked after all request headers are seen.
Request line hook, invoked after a request line has been parsed.
Request trailer hook, invoked after all trailer headers are seen, and if they are seen (not invoked otherwise).
Request URI normalization hook, for overriding default normalization of URI.
Response hook, invoked after a response has been seen. There isn't a separate transaction hook, use this hook to do something whenever a transaction is complete.
Response body data hook, invoked every time body data is available. Each invocation will provide a htp_tx_data_t instance. Chunked data will be dechunked before the data is passed to this hook. By default, compressed data will be decompressed, but decompression can be disabled in configuration. At the end of the response body there will be a call with the data pointer set to NULL.
Response headers book, invoked after all response headers have been seen.
Response line hook, invoked after a response line has been parsed.
Response trailer hook, invoked after all trailer headers have been processed, and only if the trailer exists.
Transaction start hook, invoked when the parser receives the first byte of a new transaction.
Log level, which will be used when deciding whether to store or ignore the messages issued by the parser.
int(* htp_cfg_t::parameter_processor)(table_t *params, bstr *name, bstr *value) |
The function to use to transform parameters after parsing.
int(* htp_cfg_t::parse_request_line)(htp_connp_t *connp) |
The function used for request line parsing. Depends on the personality.
int(* htp_cfg_t::parse_response_line)(htp_connp_t *connp) |
The function used for response line parsing. Depends on the personality.
Should we treat backslash characters as path segment separators?
Should we treat paths as case insensitive?
Should we compress multiple path segment separators into one?
This parameter is used to predict how a server will react when control characters are present in a request path, but does not affect path normalization.
Should the parser convert UTF-8 into a single-byte stream, using best-fit?
Should we URL-decode encoded path segment separators?
Should we decode u-encoded characters?
How do handle invalid encodings: URL_DECODER_LEAVE_PERCENT, URL_DECODER_REMOVE_PERCENT or URL_DECODER_DECODE_INVALID.
Controls how invalid UTF-8 characters are handled.
Controls how encoded NUL bytes are handled.
Controls how raw NUL bytes are handled.
How will the server handle UCS-2 characters?
TODO Unused
int(* htp_cfg_t::process_request_header)(htp_connp_t *connp) |
The function used for request header parsing. Depends on the personality.
int(* htp_cfg_t::process_response_header)(htp_connp_t *connp) |
The function used for response header parsing. Depends on the personality.
Whether to automatically decompress compressed response bodies.
Server personality ID.
char* htp_cfg_t::tmpdir |
Whether to delete each transaction after the last hook is invoked. This feature should be used when parsing traffic streams in real time.
void* htp_cfg_t::user_data |
Opaque user data associated with this configuration structure.