]> granicus.if.org Git - apache/commitdiff
Remove ap_send_fb and ap_send_fb_length. These functions don't make much
authorRyan Bloom <rbb@apache.org>
Sun, 8 Oct 2000 00:55:46 +0000 (00:55 +0000)
committerRyan Bloom <rbb@apache.org>
Sun, 8 Oct 2000 00:55:46 +0000 (00:55 +0000)
sense anymore, because the BUFFs that Apache used to use it for have all
been replaced with buckets.  BUFFs can't be used with filters, and Apache
doesn't use these functions anywhere anymore, so they need to go away now.

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

include/http_protocol.h
modules/http/http_protocol.c

index a368646ba49ad9f5cdec6218178353581a7b14c9..1900d36c6de4134b9e55101f03fbf89543a11e5a 100644 (file)
@@ -225,23 +225,6 @@ API_EXPORT(int) ap_meets_conditions(request_rec *r);
  */
 API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, 
                                    apr_size_t length, apr_size_t *nbytes);
-/**
- * Send the body of a response to the client
- * @param f The BUFF structure associated with a client
- * @param r The current request
- * @return The number of bytes sent
- * @deffunc long ap_send_fb(BUFF *f, request_rec *r)
- */
-API_EXPORT(long) ap_send_fb(BUFF *f, request_rec *r);
-/**
- * Send a specified number of bytes from the body of the response to the client
- * @param f the BUFF structure associated with a client
- * @param r The current request
- * @param length The number of bytes to send
- * @return The number of bytes sent
- * @deffunc long ap_send_fb_length(BUFF *f, request_rec *r, long length)
- */
-API_EXPORT(long) ap_send_fb_length(BUFF *f, request_rec *r, long length);
 /**
  * Send an MMAP'ed file to the client
  * @param mm The MMAP'ed file to send
index 55420dcdb52b182e744e56f1b558c09af2f94ca9..2f700ce43ed0ff4097328be100b5a642cae07a1f 100644 (file)
@@ -2769,77 +2769,6 @@ API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of
 } 
 #endif
 
-/*
- * Send the body of a response to the client.
- */
-API_EXPORT(long) ap_send_fb(BUFF *fb, request_rec *r)
-{
-    return ap_send_fb_length(fb, r, -1);
-}
-
-API_EXPORT(long) ap_send_fb_length(BUFF *fb, request_rec *r, long length)
-{
-    char buf[IOBUFSIZE];
-    long total_bytes_sent = 0;
-    long zero_timeout = 0;
-    register int o;
-    apr_ssize_t n;
-    apr_ssize_t bytes_read;
-    apr_status_t read_rv;
-
-    if (length == 0) {
-        return 0;
-    }
-
-    /* This function tries to as much as possible through non-blocking
-     * reads so that it can do writes while waiting for the CGI to
-     * produce more data. This way, the CGI's output gets to the client
-     * as soon as possible */
-
-    ap_bsetopt(fb, BO_TIMEOUT, &zero_timeout);
-    while (!r->connection->aborted) {
-        read_rv = ap_bread(fb, buf, sizeof(buf), &n);
-    got_read:
-        bytes_read = n;
-        /* Regardless of read errors, EOF, etc, bytes may have been read */
-        o = ap_rwrite(buf, n, r);
-        if (o < 0)
-            break;
-        total_bytes_sent += o;
-        if (read_rv == APR_SUCCESS) {
-            /* Assume a sucessful read of 0 bytes is an EOF 
-             * Note: I don't think this is ultimately the right thing.
-             * Read functions should explicitly return EOF. 
-             * wgs
-             */
-            if (bytes_read == 0) {
-                (void) ap_rflush(r);
-                break;
-            }
-        }
-        else if (read_rv == APR_EOF) {
-            (void) ap_rflush(r);
-            break;
-        }
-        else if (!APR_STATUS_IS_EAGAIN(read_rv)) {
-            r->connection->aborted = 1;
-            break;
-        }
-        else {
-            /* next read will block, so flush the client now */
-            if (ap_rflush(r) == EOF) {
-                break;
-            }
-            ap_bsetopt(fb, BO_TIMEOUT, &r->server->timeout);
-            read_rv = ap_bread(fb, buf, sizeof(buf), &n);
-            ap_bsetopt(fb, BO_TIMEOUT, &zero_timeout);
-            goto got_read;
-        }
-    }
-    SET_BYTES_SENT(r);
-    return total_bytes_sent;
-}
-
 #ifdef USE_MMAP_FILES
 
 /* The code writes MMAP_SEGMENT_SIZE bytes at a time.  This is due to Apache's