summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2001-12-03 00:13:32 +0100
committerBrian Pane <brianp@apache.org>2001-12-03 00:13:32 +0100
commitcf8cbe7e2d382580042d86eee72778104e4708d3 (patch)
tree3f6abcdd1c517520b4bc87d7b7b32be418cd97e3 /include
parentinclude/http_protocol.h (diff)
downloadapache2-cf8cbe7e2d382580042d86eee72778104e4708d3.tar.xz
apache2-cf8cbe7e2d382580042d86eee72778104e4708d3.zip
Added a version of ap_getline() that allocs a buffer from
the request's pool, rather than copying into a caller-supplied buffer. (This lets us eliminate one copy operation on the request headers.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/http_protocol.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/http_protocol.h b/include/http_protocol.h
index bb87cbf364..d38467a811 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -526,9 +526,35 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
*/
AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
+/**
+ * Get the next line of input for the request
+ * @param s The buffer into which to read the line
+ * @param n The size of the buffer
+ * @param r The request
+ * @param fold Whether to merge continuation lines
+ * @return The length of the line, if successful
+ * n, if the line is too big to fit in the buffer
+ * -1 for miscellaneous errors
+ * @deffunc int ap_method_number_of(const char *method)
+ */
AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
/**
+ * Get the next line of input for the request
+ * @param s Pointer to the pointer to the buffer into which the line
+ * should be read; if *s==NULL, a buffer of the necessary size
+ * to hold the data will be allocated from the request pool
+ * @param n The size of the buffer
+ * @param r The request
+ * @param fold Whether to merge continuation lines
+ * @return The length of the line, if successful
+ * n, if the line is too big to fit in the buffer
+ * -1 for miscellaneous errors
+ * @deffunc int ap_method_number_of(const char *method)
+ */
+AP_DECLARE(int) ap_rgetline(char **s, int n, request_rec *r, int fold);
+
+/**
* Get the method number associated with the given string, assumed to
* contain an HTTP method. Returns M_INVALID if not recognized.
* @param method A string containing a valid HTTP method