]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r656400 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 28 May 2008 12:58:01 +0000 (12:58 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 28 May 2008 12:58:01 +0000 (12:58 +0000)
* Check for failure of apr_file_info_get call

Reported By: BOYA SUN <boya.sun case.edu>

Submitted by: rpluem
Reviewed by: jim

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

STATUS
support/ab.c

diff --git a/STATUS b/STATUS
index b00b36e4c9793a36cd7c6b37903cba4a9b5b9121..598be0560b9d228ff701ee5890e70fcfcd98322f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -94,14 +94,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * ab.c: Check for failure of apr_file_info_get call
-   [rpluem] Reported By: BOYA SUN <boya.sun case.edu>
-   Trunk version of patch:
-         http://svn.apache.org/viewvc?view=rev&revision=656400
-   Backport version for 2.2.x of patch:
-         Trunk version of patch works
-   +1: fielding, rpluem, jim
-
  * mod_proxy: Fix a regression to 2.2.8!!! that is caused by backport
    r657443. This regression causes blank pages to be displayed if the
    backend connection is faulty and mod_deflate is in place.
index 2f589e831a71b3b1b2f70d70ea45086d19049eba..e39536d1e6847eb1088ea08443a732b7a4dd9adb 100644 (file)
@@ -1947,7 +1947,12 @@ static int open_postfile(const char *pfile)
         return rv;
     }
 
-    apr_file_info_get(&finfo, APR_FINFO_NORM, postfd);
+    rv = apr_file_info_get(&finfo, APR_FINFO_NORM, postfd);
+    if (rv != APR_SUCCESS) {
+        fprintf(stderr, "ab: Could not stat POST data file (%s): %s\n", pfile,
+                apr_strerror(rv, errmsg, sizeof errmsg));
+        return rv;
+    }
     postlen = (apr_size_t)finfo.size;
     postdata = malloc(postlen);
     if (!postdata) {