]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Correct logic, detect no 'token' chars, or missing ':'
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 29 Jul 2016 21:47:19 +0000 (21:47 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 29 Jul 2016 21:47:19 +0000 (21:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754577 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index cef75175ba30c0e3310866d58fc3a69421fd7b12..60be6fb12ae6f74e2d4c274c37b5773de25a7435 100644 (file)
@@ -946,7 +946,7 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
                 {
                     /* Ensure valid token chars before ':' per RFC 7230 3.2.4 */
                     value = (char *)ap_scan_http_token(last_field);
-                    if ((value > last_field) || *value != ':') {
+                    if ((value == last_field) || *value != ':') {
                         r->status = HTTP_BAD_REQUEST;
                         apr_table_setn(r->notes, "error-notes",
                             apr_psprintf(r->pool,