httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Sun, 08 Oct 2000 00:55:47 GMT
rbb         00/10/07 17:55:47

  Modified:    src      CHANGES
               src/include http_protocol.h
               src/main http_protocol.c
  Log:
  Remove ap_send_fb and ap_send_fb_length.  These functions don't make much
  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.
  
  Revision  Changes    Path
  1.259     +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.258
  retrieving revision 1.259
  diff -u -r1.258 -r1.259
  --- CHANGES	2000/10/07 21:54:11	1.258
  +++ CHANGES	2000/10/08 00:55:45	1.259
  @@ -1,4 +1,8 @@
   Changes with Apache 2.0a7
  +  *) Remove ap_send_fb.  This is no longer used in Apache, and it doesn't
  +     make much sense, because Apache uses buckets instead of BUFFs now.
  +     [Ryan Bloom]
  +
     *) send_the_file now falls back to a read/write loop on platforms that
        do not have sendfile.
        [Ryan Bloom and Brian Havard]
  
  
  
  1.27      +0 -17     apache-2.0/src/include/http_protocol.h
  
  Index: http_protocol.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/http_protocol.h,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- http_protocol.h	2000/10/06 06:07:01	1.26
  +++ http_protocol.h	2000/10/08 00:55:46	1.27
  @@ -226,23 +226,6 @@
   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
    * @param r The current request
  
  
  
  1.149     +0 -71     apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.148
  retrieving revision 1.149
  diff -u -r1.148 -r1.149
  --- http_protocol.c	2000/10/07 05:41:59	1.148
  +++ http_protocol.c	2000/10/08 00:55:46	1.149
  @@ -2769,77 +2769,6 @@
   } 
   #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
  
  
  

Mime
View raw message