]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backports: r1102124 (in part, protocol.c only)
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 22 Dec 2016 18:48:47 +0000 (18:48 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 22 Dec 2016 18:48:47 +0000 (18:48 +0000)
Submitted by: sf
Use APR_STATUS_IS_... in some more cases.
While this is not strictly necessary everywhere, it makes it much easier
to find the problematic cases.

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

server/protocol.c

index f20f315269f9a0d9ab1ed37042014be13bfd7830..b96d9c760f425ab3a62b59e3fe323d787002e0f2 100644 (file)
@@ -608,13 +608,13 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
              * buffer before finding the end-of-line.  This is only going to
              * happen if it exceeds the configured limit for a request-line.
              */
-            if (rv == APR_ENOSPC) {
+            if (APR_STATUS_IS_ENOSPC(rv)) {
                 r->status    = HTTP_REQUEST_URI_TOO_LARGE;
             }
             else if (APR_STATUS_IS_TIMEUP(rv)) {
                 r->status = HTTP_REQUEST_TIME_OUT;
             }
-            else if (rv == APR_EINVAL) {
+            else if (APR_STATUS_IS_EINVAL(rv)) {
                 r->status = HTTP_BAD_REQUEST;
             }
             r->proto_num = HTTP_VERSION(1,0);