(gmake docs > stdout) |& grep -i apreq
/usr/home/pgollucci/dev/repos/asf/httpd/apreq/5.8.7_svn_prefork/include/apreq.h:239:
Warning: Member apreq_attr_to_type(T, A, P) of file apreq.h is not
documented.
/usr/home/pgollucci/dev/repos/asf/httpd/apreq/5.8.7_svn_prefork/include/apreq_error.h:43:
Warning: Member APR_EBADARG of file apreq_error.h is not documented.
Full patch attached
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
Index: include/apreq_version.h
===================================================================
--- include/apreq_version.h (revision 357313)
+++ include/apreq_version.h (working copy)
@@ -61,7 +61,7 @@
#define APREQ_MINOR_VERSION 5
/** patch level */
-#define APREQ_PATCH_VERSION 6
+#define APREQ_PATCH_VERSION 7
/**
* This symbol is defined for internal, "development" copies of libapreq.
Index: include/apreq.h
===================================================================
--- include/apreq.h (revision 357313)
+++ include/apreq.h (working copy)
@@ -37,8 +37,38 @@
*/
#ifndef WIN32
+/**
+ * The public APREQ functions are declared with APREQ_DECLARE(), so they may
+ * use the most appropriate calling convention. Public APR functions with
+ * variable arguments must use APR_DECLARE_NONSTD().
+ *
+ * @remark Both the declaration and implementations must use the same macro.
+ * @example
+ */
+/** APREQ_DECLARE(rettype) apeq_func(args)
+ */
#define APREQ_DECLARE(d) APR_DECLARE(d)
+/**
+ * The public APEQ functions using variable arguments are declared with
+ * APEQ_DECLARE_NONSTD(), as they must follow the C language calling
convention.
+ * @see APEQ_DECLARE @see APEQ_DECLARE_DATA
+ * @remark Both the declaration and implementations must use the same macro.
+ * @example
+ */
+/** APEQ_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ */
#define APREQ_DECLARE_NONSTD(d) APR_DECLARE_NONSTD(d)
+/**
+ * The public APREQ variables are declared with APREQ_DECLARE_DATA.
+ * This assures the appropriate indirection is invoked at compile time.
+ * @see APREQ_DECLARE @see APREQ_DECLARE_NONSTD
+ * @remark Note that the declaration and implementations use different forms,
+ * but both must include the macro.
+ * @example
+ */
+/** extern APREQ_DECLARE_DATA type apr_variable;\n
+ * APREQ_DECLARE_DATA type apr_variable = value;
+ */
#define APREQ_DECLARE_DATA
#else
#define APREQ_DECLARE(type) __declspec(dllexport) type __stdcall
@@ -46,31 +76,109 @@
#define APREQ_DECLARE_DATA __declspec(dllexport)
#endif
+/**
+ * Read chucks of data in 64k blocks from the request
+ */
+
#define APREQ_DEFAULT_READ_BLOCK_SIZE (64 * 1024)
+
+/**
+ * Maximum number of bytes mod_apreq2 will send off to libapreq2 for parsing.
+ * mod_apreq2 will log this event and subsequently remove itself
+ * from the filter chain.
+ * @see ap_set_read_limit
+ */
#define APREQ_DEFAULT_READ_LIMIT (64 * 1024 * 1024)
+/**
+ * Maximum number of bytes mod_apreq2 will let accumulate within the
+ * heap-buckets in a brigade. Excess data will be spooled to an
+ * appended file bucket
+ * @see ap_set_brigade_read_limit
+ */
#define APREQ_DEFAULT_BRIGADE_LIMIT (256 * 1024)
+
+/**
+ * Number of elements in the initial apr_table
+ * @see apr_table_make
+ */
#define APREQ_DEFAULT_NELTS 8
+/**
+ * Check to see if specified bit f is off in bitfiled name
+ */
#define APREQ_FLAGS_OFF(f, name) ((f) &= ~(name##_MASK << name##_BIT))
+/**
+ * Check to see if specified bit f is on in bitfiled name
+ */
#define APREQ_FLAGS_ON(f, name) ((f) |= (name##_MASK << name##_BIT))
+/**
+ * Get specified bit f in bitfiled name
+ */
#define APREQ_FLAGS_GET(f, name) (((f) >> name##_BIT) & name##_MASK)
+/**
+ * Set specified bit f in bitfiled name to value
+ * Note the below BIT/Mask defines are used sans the
+ * _BIT, _MASK because of the this define's ##_MASK, ##_BIT usage.
+ * Each come in a pair
+ */
#define APREQ_FLAGS_SET(f, name, value) \
((f) = (((f) & ~(name##_MASK << name##_BIT)) \
| ((name##_MASK & (value)) << name##_BIT)))
+/**
+ * Charset Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
+#define APREQ_CHARSET_BIT 0
-#define APREQ_CHARSET_BIT 0
+/**
+ * Charset Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_CHARSET_MASK 255
+/**
+ * Tainted Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_TAINTED_BIT 8
+/**
+ * Tainted Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_TAINTED_MASK 1
+/**
+ * Cookier Version Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
+
#define APREQ_COOKIE_VERSION_BIT 11
+/**
+ * Cookie Version Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_COOKIE_VERSION_MASK 3
+/**
+ * Cookie's Secure Bit
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_COOKIE_SECURE_BIT 13
+/**
+ * Cookie's Secure Mask
+ * @see APREQ_FLAGS_OFF @see APREQ_FLAGS_ON
+ * @see APREQ_FLAGS_GET @see APREQ_FLAGS_SET
+ */
#define APREQ_COOKIE_SECURE_MASK 1
/** Character encodings. */
@@ -111,11 +219,23 @@
char data[1]; /**< value data */
} apreq_value_t;
+/**
+ * Adds the specified apreq_value_t to the apr_table_t.
+ *
+ * @param v value to add
+ * @param t add v to this table
+ *
+ * @return void
+ *
+ * @ see apr_table_t @see apr_value_t
+ */
+
static APR_INLINE
void apreq_value_table_add(const apreq_value_t *v, apr_table_t *t) {
apr_table_addn(t, v->name, v->data);
}
+
#define apreq_attr_to_type(T,A,P) ( (T*) ((char*)(P)-offsetof(T,A)) )
/**
Index: module/apache2/apreq_module_apache2.h
===================================================================
--- module/apache2/apreq_module_apache2.h (revision 357313)
+++ module/apache2/apreq_module_apache2.h (working copy)
@@ -139,7 +139,24 @@
*/
APREQ_DECLARE(apreq_handle_t *) apreq_handle_apache2(request_rec *r);
+/**
+ * The mod_apreq2 filter is named "apreq2", and may be used in Apache's
+ * input filter directives, e.g.
+ * @code
+ *
+ * AddInputFilter apreq2 # or
+ * SetInputFilter apreq2
+ * @endcode
+ * See above
+ */
#define APREQ_FILTER_NAME "apreq2"
+
+/**
+ * The Apache2 Module Magic Number for use in the Apache 2.x module structures
+ * This gets bumped if changes in th4e API will break third party applications
+ * using this apache2 module
+ * @see APREQ_MODULE
+ */
#define APREQ_APACHE2_MMN 20050712
/** @} */
Index: module/apache2/filter.c
===================================================================
--- module/apache2/filter.c (revision 357313)
+++ module/apache2/filter.c (working copy)
@@ -36,7 +36,7 @@
/* d == OR_ALL */
struct dir_config *dc = apr_palloc(p, sizeof *dc);
dc->temp_dir = NULL;
- dc->read_limit = (apr_uint64_t)-1;
+ dc->read_limit = APREQ_DEFAULT_READ_LIMIT;
dc->brigade_limit = APREQ_DEFAULT_BRIGADE_LIMIT;
return dc;
}