From: Stefan Eissing Date: Thu, 17 Nov 2016 15:43:54 +0000 (+0000) Subject: addendum to r1769760 to make it generate 100 status lines X-Git-Tag: 2.5.0-alpha~1000 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ebdeabd300e2a01c81ec2347a90323ddfab65dd;p=apache addendum to r1769760 to make it generate 100 status lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1770220 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index d7b995d0d4..29cc8d697c 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -826,27 +826,25 @@ static int index_of_response(int status) } } } - return 0; /* Status unknown (falls in gap) or above 600 */ + return -2; /* Status unknown (falls in gap) or above 600 */ } AP_DECLARE(int) ap_index_of_response(int status) { int index = index_of_response(status); - return (index <= 0) ? LEVEL_500 : index; + return (index < 0) ? LEVEL_500 : index; } AP_DECLARE(const char *) ap_get_status_line_ex(apr_pool_t *p, int status) { int index = index_of_response(status); - if (index < 0) { - return status_lines[LEVEL_500]; + if (index >= 0) { + return status_lines[index]; } - else if (index == 0) { + else if (index == -2) { return apr_psprintf(p, "%i Status %i", status, status); } - else { - return status_lines[index]; - } + return status_lines[LEVEL_500]; } AP_DECLARE(const char *) ap_get_status_line(int status)