summaryrefslogtreecommitdiffstats
path: root/modules/http/http_protocol.c
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2016-11-17 16:43:54 +0100
committerStefan Eissing <icing@apache.org>2016-11-17 16:43:54 +0100
commit2ebdeabd300e2a01c81ec2347a90323ddfab65dd (patch)
tree8cccab42692988e204c17679229cca81198c8e3b /modules/http/http_protocol.c
parentActually cause the Host header to be overridden, as noted by rpluem, (diff)
downloadapache2-2ebdeabd300e2a01c81ec2347a90323ddfab65dd.tar.xz
apache2-2ebdeabd300e2a01c81ec2347a90323ddfab65dd.zip
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
Diffstat (limited to '')
-rw-r--r--modules/http/http_protocol.c14
1 files changed, 6 insertions, 8 deletions
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)