httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1775697 - /httpd/httpd/branches/2.2.x-merge-http-strict/server/protocol.c
Date Thu, 22 Dec 2016 18:48:47 GMT
Author: wrowe
Date: Thu Dec 22 18:48:47 2016
New Revision: 1775697

URL: http://svn.apache.org/viewvc?rev=1775697&view=rev
Log:
Backports: r1102124 (in part, protocol.c only)
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.


Modified:
    httpd/httpd/branches/2.2.x-merge-http-strict/server/protocol.c

Modified: httpd/httpd/branches/2.2.x-merge-http-strict/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x-merge-http-strict/server/protocol.c?rev=1775697&r1=1775696&r2=1775697&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x-merge-http-strict/server/protocol.c (original)
+++ httpd/httpd/branches/2.2.x-merge-http-strict/server/protocol.c Thu Dec 22 18:48:47 2016
@@ -608,13 +608,13 @@ static int read_request_line(request_rec
              * 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);



Mime
View raw message