Commit 900f7b6f authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

Normalization patch bringing 2.2.x branch closer to 2.4.x,

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
parent 8b40fcef
Loading
Loading
Loading
Loading
+1 −19
Original line number Diff line number Diff line
@@ -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'