HTPSetEvent(s, htud, STREAM_TOSERVER,
HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED);
}
- if (tx->is_protocol_0_9 && tx->request_method_number == HTP_M_UNKNOWN &&
- (tx->request_protocol_number == HTP_PROTOCOL_INVALID ||
- tx->request_protocol_number == HTP_PROTOCOL_UNKNOWN)) {
+ if (tx->is_protocol_0_9 && tx->request_method_number == HTP_METHOD_UNKNOWN &&
+ (tx->request_protocol_number == HTP_PROTOCOL_INVALID ||
+ tx->request_protocol_number == HTP_PROTOCOL_UNKNOWN)) {
HtpTxUserData *htud = (HtpTxUserData *) htp_tx_get_user_data(tx);
if (htud == NULL)
return;
if (!tx_ud->response_body_init) {
tx_ud->response_body_init = 1;
- if (d->tx->request_method_number == HTP_M_POST) {
+ if (d->tx->request_method_number == HTP_METHOD_POST) {
SCLogDebug("POST");
int r = HtpRequestBodySetupMultipart(d->tx, tx_ud);
if (r == 1) {
tx_ud->request_body_type = HTP_BODY_REQUEST_POST;
SCLogDebug("not multipart");
}
- } else if (d->tx->request_method_number == HTP_M_PUT) {
+ } else if (d->tx->request_method_number == HTP_METHOD_PUT) {
tx_ud->request_body_type = HTP_BODY_REQUEST_PUT;
}
}
AppLayerParserTriggerRawStreamReassembly(hstate->f, STREAM_TOCLIENT);
/* handle HTTP CONNECT */
- if (tx->request_method_number == HTP_M_CONNECT) {
+ if (tx->request_method_number == HTP_METHOD_CONNECT) {
/* any 2XX status response implies that the connection will become
a tunnel immediately after this packet (RFC 7230, 3.3.3). */
if ((tx->response_status_number >= 200) &&
FAIL_IF_NULL(h);
FAIL_IF(strcmp(bstr_util_strdup_to_c(h->value), "Victor/1.0"));
- FAIL_IF(tx->request_method_number != HTP_M_POST);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_POST);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_0);
AppLayerParserThreadCtxFree(alp_tctx);
FAIL_IF_NULL(h);
FAIL_IF(strcmp(bstr_util_strdup_to_c(h->value), "Victor/1.0"));
- FAIL_IF(tx->request_method_number != HTP_M_POST);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_POST);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_0);
AppLayerParserThreadCtxFree(alp_tctx);
FAIL_IF_NULL(h);
FAIL_IF(strcmp(bstr_util_strdup_to_c(h->value), "Victor/1.0"));
- FAIL_IF(tx->request_method_number != HTP_M_POST);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_POST);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_0);
AppLayerParserThreadCtxFree(alp_tctx);
FAIL_IF_NULL(h);
FAIL_IF(strcmp(bstr_util_strdup_to_c(h->value), "Victor/1.0"));
- FAIL_IF(tx->request_method_number != HTP_M_POST);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_POST);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_0);
AppLayerParserThreadCtxFree(alp_tctx);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NOT_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_UNKNOWN);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_UNKNOWN);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_0);
AppLayerParserThreadCtxFree(alp_tctx);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NOT_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_UNKNOWN);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_UNKNOWN);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_0_9);
AppLayerParserThreadCtxFree(alp_tctx);
htp_tx_t *tx = HTPStateGetTx(http_state, 0);
FAIL_IF_NULL(tx);
- FAIL_IF_NOT(tx->request_method_number == HTP_M_POST);
+ FAIL_IF_NOT(tx->request_method_number == HTP_METHOD_POST);
FAIL_IF_NOT(tx->request_protocol_number == HTP_PROTOCOL_1_0);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
htp_tx_t *tx = HTPStateGetTx(http_state, 0);
FAIL_IF_NULL(tx);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
FAIL_IF(tx->response_status_number != 200);
htp_tx_t *tx = HTPStateGetTx(htp_state, 0);
FAIL_IF_NULL(tx);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
void *txtmp = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP1, f->alstate, 0);
htp_tx_t *tx = HTPStateGetTx(htp_state, 0);
FAIL_IF_NULL(tx);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
void *txtmp = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP1, f->alstate, 0);
htp_tx_t *tx = HTPStateGetTx(htp_state, 0);
FAIL_IF_NULL(tx);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
FAIL_IF(tx->response_status_number != 0);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
FAIL_IF(tx->response_status_number != 0);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
FAIL_IF(tx->response_status_number != -0);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
FAIL_IF(tx->response_status_number != -1);
htp_header_t *h = htp_table_get_index(tx->request_headers, 0, NULL);
FAIL_IF_NULL(h);
- FAIL_IF(tx->request_method_number != HTP_M_GET);
+ FAIL_IF(tx->request_method_number != HTP_METHOD_GET);
FAIL_IF(tx->request_protocol_number != HTP_PROTOCOL_1_1);
FAIL_IF(tx->response_status_number != -1);