]> granicus.if.org Git - apache/commitdiff
Fix for a bug that I introduced when eliminating the single-byte
authorBrian Pane <brianp@apache.org>
Sat, 30 Mar 2002 22:48:39 +0000 (22:48 +0000)
committerBrian Pane <brianp@apache.org>
Sat, 30 Mar 2002 22:48:39 +0000 (22:48 +0000)
reads in mod_cgi: eof wasn't treated as an error condition when
reading the script headers, so we were delivering a 200 when a
CGI script produced no output.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94342 13f79535-47bb-0310-9956-ffa450edef68

server/util_script.c

index 7a790d577ddb6beed72ff1f05bad2e8919926ef9..d5f6f893e13ec03bac7a53a069baa4639ce034c7 100644 (file)
@@ -636,7 +636,7 @@ static int getsfunc_BRIGADE(char *buf, int len, void *arg)
 
         rv = apr_bucket_read(e, &bucket_data, &bucket_data_len,
                              APR_BLOCK_READ);
-        if (!APR_STATUS_IS_SUCCESS(rv)) {
+        if (!APR_STATUS_IS_SUCCESS(rv) || (bucket_data_len == 0)) {
             return 0;
         }
         src = bucket_data;