]> granicus.if.org Git - apache/commitdiff
Correct usage for ap_scan_http_token (had used _get_ syntax), noted by RĂ¼diger
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 29 Jul 2016 20:22:37 +0000 (20:22 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 29 Jul 2016 20:22:37 +0000 (20:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754570 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 3e8b787a3522607de80d7aad2e9b2d3e5c192321..cef75175ba30c0e3310866d58fc3a69421fd7b12 100644 (file)
@@ -945,8 +945,8 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
                 else /* Using strict RFC7230 parsing */
                 {
                     /* Ensure valid token chars before ':' per RFC 7230 3.2.4 */
-                    if (!(value = (char *)ap_scan_http_token(last_field))
-                            || *value != ':') {
+                    value = (char *)ap_scan_http_token(last_field);
+                    if ((value > last_field) || *value != ':') {
                         r->status = HTTP_BAD_REQUEST;
                         apr_table_setn(r->notes, "error-notes",
                             apr_psprintf(r->pool,