summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h2
-rw-r--r--include/http_protocol.h24
-rw-r--r--include/mod_core.h5
3 files changed, 25 insertions, 6 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 25fa16e963..7b6753cbe4 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -708,7 +708,7 @@
* 20211221.6 (2.5.1-dev) Add new meta buckets request/response/headers
* Add field `body_indeterminate` in request_rec
* Add new http/1.x formatting helpers
- * Add ap_assign_request()
+ * Add ap_assign_request_line()
* 20211221.7 (2.5.1-dev) Add ap_h1_append_header()
*/
diff --git a/include/http_protocol.h b/include/http_protocol.h
index a2113d99d3..4bfe4a8559 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -65,19 +65,33 @@ AP_DECLARE(request_rec *) ap_create_request(conn_rec *c);
* @param c The current connection
* @return The new request_rec
*/
-request_rec *ap_read_request(conn_rec *c);
+AP_DECLARE(request_rec *) ap_read_request(conn_rec *c);
/**
- * Assign the method, uri and protocol to the request.
+ * Assign the method, uri and protocol (in HTTP/1.x the
+ * items from the first line) to the request.
* @param r The current request
* @param method the HTTP method
* @param uri the request uri
* @param protocol the request protocol
* @return 1 on success, 0 on failure
*/
-AP_DECLARE(int) ap_assign_request(request_rec *r,
- const char *method, const char *uri,
- const char *protocol);
+AP_DECLARE(int) ap_assign_request_line(request_rec *r,
+ const char *method, const char *uri,
+ const char *protocol);
+
+/**
+ * Parse a HTTP/1.x request line, validate and return the components
+ * @param r The current request
+ * @param line the line to parse
+ * @param pmethod the parsed method on success
+ * @param puri the parsed uri on success
+ * @param pprotocol the parsed protocol on success
+ * @return 1 on success, 0 on failure
+ */
+AP_DECLARE(int) ap_h1_tokenize_request_line(
+ request_rec *r, const char *line,
+ const char **pmethod, const char **puri, const char **pprotocol);
/**
* Parse and validate the request line.
diff --git a/include/mod_core.h b/include/mod_core.h
index 0c795ceeee..f9cc0611f4 100644
--- a/include/mod_core.h
+++ b/include/mod_core.h
@@ -41,6 +41,7 @@ extern "C" {
/* Handles for core filters */
AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_input_filter_handle;
+AP_DECLARE_DATA extern ap_filter_rec_t *ap_h1_request_in_filter_handle;
AP_DECLARE_DATA extern ap_filter_rec_t *ap_h1_body_in_filter_handle;
AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_header_filter_handle;
AP_DECLARE_DATA extern ap_filter_rec_t *ap_chunk_filter_handle;
@@ -54,6 +55,10 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
ap_input_mode_t mode, apr_read_type_e block,
apr_off_t readbytes);
+apr_status_t ap_h1_request_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
+ ap_input_mode_t mode, apr_read_type_e block,
+ apr_off_t readbytes);
+
apr_status_t ap_h1_body_in_filter(ap_filter_t *f, apr_bucket_brigade *b,
ap_input_mode_t mode, apr_read_type_e block,
apr_off_t readbytes);