summaryrefslogtreecommitdiff
path: root/include/util_script.h
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-07-16 21:53:18 +0000
committerStefan Fritsch <sf@apache.org>2011-07-16 21:53:18 +0000
commitbeb3ea9c11ef0fb6396403120f29d9ab2cae3215 (patch)
tree6d5994e64b06a8a5292c1e69f893bde01470211c /include/util_script.h
parent255b79ce73dae6177c63ee6fadd49bc90086e2a6 (diff)
downloadhttpd-beb3ea9c11ef0fb6396403120f29d9ab2cae3215.tar.gz
Add more (trace) logging to the ap_scan_script_header*() functions
Add ap_scan_script_header*_ex() functions that take a module index for logging. Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the new functions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/util_script.h')
-rw-r--r--include/util_script.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/include/util_script.h b/include/util_script.h
index e019aaefd8..e7fe61740b 100644
--- a/include/util_script.h
+++ b/include/util_script.h
@@ -95,6 +95,21 @@ AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *b
* the output is valid, then the headers are added to the headers out of the
* current request
* @param r The current request
+ * @param f The file to read from
+ * @param buffer Empty when calling the function. On output, if there was an
+ * error, the string that cause the error is stored here.
+ * @param module_index The module index to be used for logging
+ * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
+ */
+AP_DECLARE(int) ap_scan_script_header_err_ex(request_rec *r, apr_file_t *f,
+ char *buffer, int module_index);
+
+
+/**
+ * Read headers output from a script, ensuring that the output is valid. If
+ * the output is valid, then the headers are added to the headers out of the
+ * current request
+ * @param r The current request
* @param bb The brigade from which to read
* @param buffer Empty when calling the function. On output, if there was an
* error, the string that cause the error is stored here.
@@ -106,6 +121,22 @@ AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,
char *buffer);
/**
+ * Read headers output from a script, ensuring that the output is valid. If
+ * the output is valid, then the headers are added to the headers out of the
+ * current request
+ * @param r The current request
+ * @param bb The brigade from which to read
+ * @param buffer Empty when calling the function. On output, if there was an
+ * error, the string that cause the error is stored here.
+ * @param module_index The module index to be used for logging
+ * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
+ */
+AP_DECLARE(int) ap_scan_script_header_err_brigade_ex(request_rec *r,
+ apr_bucket_brigade *bb,
+ char *buffer,
+ int module_index);
+
+/**
* Read headers strings from a script, ensuring that the output is valid. If
* the output is valid, then the headers are added to the headers out of the
* current request
@@ -127,6 +158,30 @@ AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r,
ap_func_attr_sentinel;
/**
+ * Read headers strings from a script, ensuring that the output is valid. If
+ * the output is valid, then the headers are added to the headers out of the
+ * current request
+ * @param r The current request
+ * @param buffer Empty when calling the function. On output, if there was an
+ * error, the string that cause the error is stored here.
+ * @param module_index The module index to be used for logging
+ * @param termch Pointer to the last character parsed.
+ * @param termarg Pointer to an int to capture the last argument parsed.
+ *
+ * The varargs are string arguments to parse consecutively for headers,
+ * with a NULL argument to terminate the list.
+ *
+ * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
+ */
+AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs_ex(request_rec *r,
+ char *buffer,
+ int module_index,
+ const char **termch,
+ int *termarg, ...)
+ ap_func_attr_sentinel;
+
+
+/**
* Read headers output from a script, ensuring that the output is valid. If
* the output is valid, then the headers are added to the headers out of the
* current request
@@ -143,6 +198,24 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
void *getsfunc_data);
/**
+ * Read headers output from a script, ensuring that the output is valid. If
+ * the output is valid, then the headers are added to the headers out of the
+ * current request
+ * @param r The current request
+ * @param buffer Empty when calling the function. On output, if there was an
+ * error, the string that cause the error is stored here.
+ * @param getsfunc Function to read the headers from. This function should
+ act like gets()
+ * @param getsfunc_data The place to read from
+ * @param module_index The module index to be used for logging
+ * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
+ */
+AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
+ int (*getsfunc) (char *, int, void *),
+ void *getsfunc_data, int module_index);
+
+
+/**
* Parse query args for the request and store in a new table allocated
* from the request pool.
* For args with no value, "1" will be used instead.