From: Yann Ylavic Date: Sun, 22 Apr 2018 15:58:18 +0000 (+0000) Subject: Axe ap_rgetline_core(), not used anymore. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2658 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fab86dcf0e4c71262bbb5796830865c33f1f00e3;p=thirdparty%2Fapache%2Fhttpd.git Axe ap_rgetline_core(), not used anymore. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829790 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mmn.h b/include/ap_mmn.h index eb66cf9c007..69746cf2564 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -574,14 +574,15 @@ * 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 diff --git a/include/http_protocol.h b/include/http_protocol.h index bf15f9837bd..b5359a27d85 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -675,29 +675,9 @@ AP_DECLARE(apr_status_t) ap_fgetline(char **s, apr_size_t n, * 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 diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 77ca3e3a712..0a84968bcc5 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1431,7 +1431,7 @@ int ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, 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'; diff --git a/modules/proxy/mod_proxy_uwsgi.c b/modules/proxy/mod_proxy_uwsgi.c index bc7e7f94148..3e04fdeb387 100644 --- a/modules/proxy/mod_proxy_uwsgi.c +++ b/modules/proxy/mod_proxy_uwsgi.c @@ -331,7 +331,7 @@ static int uwsgi_response(request_rec *r, proxy_conn_rec * backend, } 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'; diff --git a/server/protocol.c b/server/protocol.c index 86175630027..5a778df1d7e 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -550,38 +550,27 @@ AP_DECLARE(apr_status_t) ap_fgetline(char **s, apr_size_t n, * 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) {