summaryrefslogtreecommitdiff
path: root/include/http_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/http_protocol.h')
-rw-r--r--include/http_protocol.h24
1 files changed, 19 insertions, 5 deletions
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.