* 20180417.1 (2.5.1-dev) Toggle ap_filter_input|output_pending API to _NONSTD
* 20180417.2 (2.5.1-dev) Add AP_GETLINE_NOSPC_EOL flag to http_protocol.h
* 20180417.3 (2.5.1-dev) Add ap_fgetline() and AP_GETLINE_NONBLOCK flag
+ * 20180422.1 (2.5.1-dev) Axe ap_rgetline_core()
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20180417
+#define MODULE_MAGIC_NUMBER_MAJOR 20180422
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 3 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
* Note: genuinely calls, ap_fgetline(s, n, read, r->proto_input_filters,
* flags, bb, r->pool)
*/
-AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
- apr_size_t *read, request_rec *r,
- int flags, apr_bucket_brigade *bb);
-
-/**
- * @see ap_rgetline_core
- *
- * Note: on ASCII boxes, ap_rgetline is a macro which simply calls
- * ap_rgetline_core to get the line of input.
- *
- * on EBCDIC boxes, ap_rgetline is a wrapper function which
- * translates ASCII protocol lines to the local EBCDIC code page
- * after getting the line of input.
- *
- */
-#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 flags, apr_bucket_brigade *bb);
-#else /* ASCII box */
-#define ap_rgetline(s, n, read, r, flags, bb) \
- ap_rgetline_core((s), (n), (read), (r), (flags), (bb))
-#endif
/**
* Get the method number associated with the given string, assumed to
buffer[12] = keepchar;
} else {
/* 2616 requires the space in Status-Line; the origin
- * server may have sent one but ap_rgetline_core will
+ * server may have sent one but ap_rgetline will
* have stripped it. */
buffer[12] = ' ';
buffer[13] = '\0';
}
else {
/* 2616 requires the space in Status-Line; the origin
- * server may have sent one but ap_rgetline_core will
+ * server may have sent one but ap_rgetline will
* have stripped it. */
buffer[status_end] = ' ';
buffer[status_end + 1] = '\0';
* stricter protocol adherence and better input filter behavior during
* chunked trailer processing (for http).
*/
-AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
- apr_size_t *read, request_rec *r,
- int flags, apr_bucket_brigade *bb)
-{
- return ap_fgetline_core(s, n, read, r->proto_input_filters, flags,
- bb, r->pool);
-}
-
-#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 flags, apr_bucket_brigade *bb)
{
- /* on ASCII boxes, ap_rgetline is a macro which simply invokes
- * ap_rgetline_core with the same parms
- *
- * on EBCDIC boxes, each complete http protocol input line needs to be
- * translated into the code page used by the compiler. Since
- * ap_fgetline_core uses recursion, we do the translation in a wrapper
- * function to ensure that each input character gets translated only once.
- */
apr_status_t rv;
rv = ap_fgetline_core(s, n, read, r->proto_input_filters, flags,
bb, r->pool);
+#if APR_CHARSET_EBCDIC
+ /* On EBCDIC boxes, each complete http protocol input line needs to be
+ * translated into the code page used by the compiler. Since
+ * ap_fgetline_core uses recursion, we do the translation in a wrapper
+ * function to ensure that each input character gets translated only once.
+ */
if (*read) {
ap_xlate_proto_from_ascii(*s, *read);
}
+#endif
return rv;
}
-#endif
AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int flags)
{