You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2016/11/17 15:43:54 UTC

svn commit: r1770220 - /httpd/httpd/trunk/modules/http/http_protocol.c

Author: icing
Date: Thu Nov 17 15:43:54 2016
New Revision: 1770220

URL: http://svn.apache.org/viewvc?rev=1770220&view=rev
Log:
addendum to r1769760 to make it generate 100 status lines

Modified:
    httpd/httpd/trunk/modules/http/http_protocol.c

Modified: httpd/httpd/trunk/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_protocol.c?rev=1770220&r1=1770219&r2=1770220&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_protocol.c (original)
+++ httpd/httpd/trunk/modules/http/http_protocol.c Thu Nov 17 15:43:54 2016
@@ -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)