summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2002-07-04 17:05:25 +0000
committerBrian Pane <brianp@apache.org>2002-07-04 17:05:25 +0000
commit708e1d6117929527a8c96b192bd9b2bd5022ee6d (patch)
tree787975efc337619ac91413b79d759a0f5224727d /include
parent3b5826f7e9b8f4ec208bf1574e67f236e6f1de52 (diff)
downloadhttpd-708e1d6117929527a8c96b192bd9b2bd5022ee6d.tar.gz
Re-use the same temp brigade to read all lines of a request header,
to avoid the overhead of brigade creation and deletion. (This produced a 5% reduction in the total CPU usage of a minimalist httpd configuration: <JHEPKCEMGPKFFDHHDDKDMELFEKAA.bill@wstoddard.com>) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95956 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/http_protocol.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/http_protocol.h b/include/http_protocol.h
index 17a2d153c8..211775396c 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -95,7 +95,16 @@ request_rec *ap_read_request(conn_rec *c);
* Read the mime-encoded headers.
* @param r The current request
*/
-void ap_get_mime_headers(request_rec *r);
+AP_DECLARE(void) ap_get_mime_headers(request_rec *r);
+
+/**
+ * Optimized version of ap_get_mime_headers() that requires a
+ * temporary brigade to work with
+ * @param r The current request
+ * @param bb temp brigade
+ */
+AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r,
+ apr_bucket_brigade *bb);
/* Finish up stuff after a request */
@@ -573,6 +582,7 @@ AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
* @param read The length of the line.
* @param r The request
* @param fold Whether to merge continuation lines
+ * @param bb Working brigade to use when reading buckets
* @return APR_SUCCESS, if successful
* APR_ENOSPC, if the line is too big to fit in the buffer
* Other errors where appropriate
@@ -580,14 +590,16 @@ AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
#if APR_CHARSET_EBCDIC
AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
apr_size_t *read,
- request_rec *r, int fold);
+ request_rec *r, int fold,
+ apr_bucket_brigade *bb);
#else /* ASCII box */
-#define ap_rgetline(s, n, read, r, fold) \
- ap_rgetline_core((s), (n), (read), (r), (fold))
+#define ap_rgetline(s, n, read, r, fold, bb) \
+ ap_rgetline_core((s), (n), (read), (r), (fold), (bb))
#endif
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
apr_size_t *read,
- request_rec *r, int fold);
+ request_rec *r, int fold,
+ apr_bucket_brigade *bb);
/**
* Get the method number associated with the given string, assumed to