#define HTP_METHOD_PUT HTP_M_PUT
#define HTP_METHOD_CONNECT HTP_M_CONNECT
+#define HTP_STREAM_STATE_ERROR HTP_STREAM_ERROR
+#define HTP_STREAM_STATE_TUNNEL HTP_STREAM_TUNNEL
+
bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, bool uri_include_all);
#endif /* SURICATA_APP_LAYER_HTP_LIBHTP__H */
if (input_len > 0) {
const int r = htp_connp_req_data(hstate->connp, &ts, input, input_len);
switch (r) {
- case HTP_STREAM_ERROR:
+ case HTP_STREAM_STATE_ERROR:
ret = -1;
break;
default:
if (input_len > 0) {
const int r = htp_connp_res_data(hstate->connp, &ts, input, input_len);
switch (r) {
- case HTP_STREAM_ERROR:
+ case HTP_STREAM_STATE_ERROR:
ret = -1;
break;
- case HTP_STREAM_TUNNEL:
+ case HTP_STREAM_STATE_TUNNEL:
tx = htp_connp_get_out_tx(hstate->connp);
if (tx != NULL && tx->response_status_number == 101) {
htp_header_t *h =
consumed = (uint32_t)htp_connp_res_data_consumed(hstate->connp);
if (bstr_cmp_c(h->value, "h2c") == 0) {
if (AppLayerProtoDetectGetProtoName(ALPROTO_HTTP2) == NULL) {
- // if HTTP2 is disabled, keep the HTP_STREAM_TUNNEL mode
+ // if HTTP2 is disabled, keep the HTP_STREAM_STATE_TUNNEL mode
break;
}
hstate->slice = NULL;
SCReturnStruct(APP_LAYER_OK);
} else if (bstr_cmp_c_nocase(h->value, "WebSocket") == 0) {
if (AppLayerProtoDetectGetProtoName(ALPROTO_WEBSOCKET) == NULL) {
- // if WS is disabled, keep the HTP_STREAM_TUNNEL mode
+ // if WS is disabled, keep the HTP_STREAM_STATE_TUNNEL mode
break;
}
hstate->slice = NULL;