]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Normalization patch bringing 2.2.x branch closer to 2.4.x,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 22 Aug 2016 18:36:29 +0000 (18:36 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 22 Aug 2016 18:36:29 +0000 (18:36 +0000)
without functional changes.

Backports: r1213391, r1237407
Submitted by: rjung

zap an unhelpful, out of date comment from httpd 1.2
s/insure/ensure/

Backports: r1407004, r1407088, r1407528
Submitted by: sf

Remove unused code. "Next week" hasn't happened in the last 10 years or so.
remove some more old unused code
remove obsolete comment from 1.3 days

Backports: r1621419 (protocol.c only)
Submitted by: jailletc36

Fix sscanf format spotted by cppcheck
(changes version major/minor types from signed to unsigned)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1757240 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index f078b2f2e442dfb76c2053162c4f143346ca318e..bbe997cb94a0a5a7a0b88529863b2aaf4aa11577 100644 (file)
@@ -511,9 +511,6 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
         status = apr_uri_parse_hostinfo(r->pool, uri, &r->parsed_uri);
     }
     else {
-        /* Simple syntax Errors in URLs are trapped by
-         * parse_uri_components().
-         */
         status = apr_uri_parse(r->pool, uri, &r->parsed_uri);
     }
 
@@ -558,10 +555,7 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
     const char *uri;
     const char *pro;
 
-#if 0
-    conn_rec *conn = r->connection;
-#endif
-    int major = 1, minor = 0;   /* Assume HTTP/1.0 if non-"HTTP" protocol */
+    unsigned int major = 1, minor = 0;   /* Assume HTTP/1.0 if non-"HTTP" protocol */
     char http[5];
     apr_size_t len;
     int num_blank_lines = 0;
@@ -615,20 +609,10 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
         }
     } while ((len <= 0) && (++num_blank_lines < max_blank_lines));
 
-    /* we've probably got something to do, ignore graceful restart requests */
-
     r->request_time = apr_time_now();
     ll = r->the_request;
     r->method = ap_getword_white(r->pool, &ll);
 
-#if 0
-/* XXX If we want to keep track of the Method, the protocol module should do
- * it.  That support isn't in the scoreboard yet.  Hopefully next week
- * sometime.   rbb */
-    ap_update_connection_status(AP_CHILD_THREAD_FROM_ID(conn->id), "Method",
-                                r->method);
-#endif
-
     uri = ap_getword_white(r->pool, &ll);
 
     /* Provide quick information about the request method as soon as known */
@@ -651,8 +635,6 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
     }
     r->protocol = apr_pstrmemdup(r->pool, pro, len);
 
-    /* XXX ap_update_connection_status(conn->id, "Protocol", r->protocol); */
-
     /* Avoid sscanf in the common case */
     if (len == 8
         && pro[0] == 'H' && pro[1] == 'T' && pro[2] == 'T' && pro[3] == 'P'