]> granicus.if.org Git - apache/commitdiff
Added a version of ap_getline() that allocs a buffer from
authorBrian Pane <brianp@apache.org>
Sun, 2 Dec 2001 23:13:32 +0000 (23:13 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 2 Dec 2001 23:13:32 +0000 (23:13 +0000)
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

include/http_protocol.h

index bb87cbf36478d26c459dcae12dc451c418ba6f68..d38467a81130e8de3933dee15c0b00219d0e5354 100644 (file)
@@ -526,8 +526,34 @@ 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.