summaryrefslogtreecommitdiff
path: root/src/http_decoder_utils.h
diff options
context:
space:
mode:
authorlijia <[email protected]>2024-07-17 14:27:15 +0800
committerlijia <[email protected]>2024-07-18 09:54:56 +0800
commitc4c7aa89bf01b321f5b582d84b684171e6dbcf66 (patch)
tree37678010c572f18f5d439101a40cc1f832e0154a /src/http_decoder_utils.h
parentb1548c7c6dc2198a4df20b11ce8eb72e766f56b7 (diff)
Add BODY_START message; add http_url_decode(); disable CONNECT tunnel.HEADv2.0.4dev-on-stellar2.0
Diffstat (limited to 'src/http_decoder_utils.h')
-rw-r--r--src/http_decoder_utils.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/http_decoder_utils.h b/src/http_decoder_utils.h
index 5b09d50..b3df52d 100644
--- a/src/http_decoder_utils.h
+++ b/src/http_decoder_utils.h
@@ -1,8 +1,21 @@
-#ifndef _HTTP_DECODER_UTILS_H_
-#define _HTTP_DECODER_UTILS_H_
+#pragma once
#include <stdlib.h>
#include <stdio.h>
+#include <cstddef>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+#include <bits/types/struct_iovec.h>
+#include "stellar/stellar.h"
+#include "stellar/utils.h"
+#include "stellar/session.h"
+#include "stellar/session_mq.h"
+#include "stellar/session_exdata.h"
+#ifdef __cplusplus
+}
+#endif
char *safe_dup(const char *str, size_t len);
int strncasecmp_safe(const char *fix_s1, const char *dyn_s2, size_t fix_n1, size_t dyn_n2);
@@ -10,6 +23,8 @@ const char *http_message_type_to_string(enum http_message_type type);
int http_message_type_is_req(struct session *sess, enum http_message_type msg_type);
int http_event_is_req(enum http_event event);
int stellar_session_mq_get_topic_id_reliable(struct stellar *st, const char *topic_name, session_msg_free_cb_func *msg_free_cb, void *msg_free_arg);
+void httpd_url_decode(const char *string, size_t length, char *ostring, size_t *olen);
+int httpd_url_is_encoded(const char *url, size_t len);
/******************************************************************************
* Logger
******************************************************************************/
@@ -45,4 +60,3 @@ enum http_decoder_log_level {
} \
}
#endif
-#endif \ No newline at end of file