Commit bbe607f5 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Change the length of the content args to apr_off_t identifiers, and fix
  mod_negotation to treat a size of -1 and indeterminate, instead of 0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89727 13f79535-47bb-0310-9956-ffa450edef68
parent db9e84ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -413,9 +413,9 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r);
 * @param bufsiz The size of the buffer
 * @return Number of bytes inserted into the buffer.  When done reading, 0
 *         if EOF, or -1 if there was an error
 * @deffunc long ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
 * @deffunc long ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz)
 */
AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz);
AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);

/**
 * In HTTP/1.1, any method can have a body.  However, most GET handlers
+4 −4
Original line number Diff line number Diff line
@@ -686,9 +686,9 @@ struct request_rec {
    ap_method_list_t *allowed_methods; 

    /** byte count in stream is for body */
    int sent_bodyct;
    apr_off_t sent_bodyct;
    /** body byte count, for easy access */
    long bytes_sent;
    apr_off_t bytes_sent;
    /** Time the resource was last modified */
    apr_time_t mtime;

@@ -704,9 +704,9 @@ struct request_rec {
    apr_off_t clength;

    /** bytes left to read */
    apr_size_t remaining;
    apr_off_t remaining;
    /** bytes that have been read */
    long read_length;
    apr_off_t read_length;
    /** how the request body should be read */
    int read_body;
    /** reading chunked transfer-coding */
+3 −3
Original line number Diff line number Diff line
@@ -148,10 +148,10 @@ struct worker_score {
#endif
    unsigned char status;
    unsigned long access_count;
    unsigned long bytes_served;
    apr_off_t     bytes_served;
    unsigned long my_access_count;
    unsigned long my_bytes_served;
    unsigned long conn_bytes;
    apr_off_t     my_bytes_served;
    apr_off_t     conn_bytes;
    unsigned short conn_count;
    apr_time_t start_time;
    apr_time_t stop_time;
+2 −2
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode
            }
            else {
                const char *c = str;
                while (c - str < length) {
                while (c < str + length) {
                    if (*c == APR_ASCII_LF)
                        c++;
                    else if (*c == APR_ASCII_CR && *(c + 1) == APR_ASCII_LF)
@@ -1422,7 +1422,7 @@ static long get_chunk_size(char *b)
 * hold a chunk-size line, including any extensions. For now, we'll leave
 * that to the caller, at least until we can come up with a better solution.
 */
AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz)
{
    apr_size_t len_read, total;
    apr_status_t rv;
+1 −1
Original line number Diff line number Diff line
@@ -381,7 +381,7 @@ static const char *clf_log_bytes_sent(request_rec *r, char *a)
        return "-";
    }
    else {
	return apr_ltoa(r->pool, r->bytes_sent);
	return apr_off_t_toa(r->pool, r->bytes_sent);
    }
}

Loading