httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sas...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c http_protocol.c
Date Fri, 03 Nov 2000 17:35:06 GMT
sascha      00/11/03 09:35:03

  Modified:    src/include http_protocol.h httpd.h
               src/main http_core.c http_protocol.c
  Log:
  Remove REQUEST_CHUNKED_PASS and change ap_discard_request_body()
  to use REQUEST_CHUNKED_DECHUNK.
  
  Because of this change, the need for handle_request_body() is gone,
  so we remove that as well.
  
  Revision  Changes    Path
  1.38      +0 -1      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.37
  retrieving revision 1.38
  diff -u -u -r1.37 -r1.38
  --- http_protocol.h	2000/11/01 00:52:03	1.37
  +++ http_protocol.h	2000/11/03 17:34:56	1.38
  @@ -388,7 +388,6 @@
    *    REQUEST_NO_BODY          Send 413 error if message has any body
    *    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
    *    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
  - *    REQUEST_CHUNKED_PASS     Pass the chunks to me without removal.
    * </PRE>
    * @return either OK or an error code
    * @deffunc int ap_setup_cleint_block(request_rec *r, int read_policy)
  
  
  
  1.111     +0 -2      apache-2.0/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -u -r1.110 -r1.111
  --- httpd.h	2000/11/01 18:10:15	1.110
  +++ httpd.h	2000/11/03 17:34:56	1.111
  @@ -540,12 +540,10 @@
    *    REQUEST_NO_BODY          Send 413 error if message has any body
    *    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
    *    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
  - *    REQUEST_CHUNKED_PASS     Pass the chunks to me without removal.
    */
   #define REQUEST_NO_BODY          0
   #define REQUEST_CHUNKED_ERROR    1
   #define REQUEST_CHUNKED_DECHUNK  2
  -#define REQUEST_CHUNKED_PASS     3
   
   /* Things which may vary per file-lookup WITHIN a request ---
    * e.g., state of MIME config.  Basically, the name of an object, info
  
  
  
  1.200     +1 -24     apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.199
  retrieving revision 1.200
  diff -u -u -r1.199 -r1.200
  --- http_core.c	2000/11/03 15:56:42	1.199
  +++ http_core.c	2000/11/03 17:34:58	1.200
  @@ -2908,25 +2908,6 @@
   
   static int do_nothing(request_rec *r) { return OK; }
   
  -#define POST_CHUNK_SIZE 4096
  -
  -static int handle_request_body(request_rec *r)
  -{
  -    int rv;
  -    char buf[POST_CHUNK_SIZE];
  -    long n;
  -
  -    if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)))
  -        return rv;
  -
  -    if ((rv = ap_should_client_block(r)) == 0)
  -        return APR_SUCCESS;
  -
  -    while ((n = ap_get_client_block(r, buf, POST_CHUNK_SIZE)) > 0);
  -
  -    return APR_SUCCESS;
  -}
  -
   static int default_handler(request_rec *r)
   {
       core_dir_config *d =
  @@ -2949,11 +2930,7 @@
   
       ap_allow_methods(r, MERGE_ALLOW, "GET", "OPTIONS", "POST", NULL);
   
  -    if (r->method_number == M_POST) {
  -        if ((errstatus = handle_request_body(r)) != APR_SUCCESS) {
  -            return errstatus;
  -        }
  -    } else if ((errstatus = ap_discard_request_body(r)) != OK) {
  +    if ((errstatus = ap_discard_request_body(r)) != OK) {
           return errstatus;
       }
       
  
  
  
  1.224     +1 -8      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.223
  retrieving revision 1.224
  diff -u -u -r1.223 -r1.224
  --- http_protocol.c	2000/11/03 16:38:28	1.223
  +++ http_protocol.c	2000/11/03 17:34:59	1.224
  @@ -816,7 +816,6 @@
       apr_ssize_t chunk_size;
       apr_ssize_t bytes_delivered;
       enum {WANT_HDR /* must have value zero */, WANT_BODY, WANT_TRL} state;
  -    int remove_chunk_proto;
   };
   
   static long get_chunk_size(char *);
  @@ -833,7 +832,6 @@
   
       if (!ctx) {
           f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(struct dechunk_ctx));
  -        ctx->remove_chunk_proto = f->r->read_body != REQUEST_CHUNKED_PASS;
       }
   
       do {
  @@ -2487,7 +2485,6 @@
    *    REQUEST_NO_BODY          Send 413 error if message has any body
    *    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
    *    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
  - *    REQUEST_CHUNKED_PASS     Pass the chunks to me without removal.
    *
    *    In order to use the last two options, the caller MUST provide a buffer
    *    large enough to hold a chunk-size line, including any extensions.
  @@ -2530,10 +2527,6 @@
           }
   
           r->read_chunked = 1;
  -        if (r->read_body == REQUEST_CHUNKED_PASS) {
  -            /* can't filter the body *and* preserve the chunk headers */
  -            r->input_filters = r->connection->input_filters;
  -        }
           ap_add_input_filter("DECHUNK", NULL, r, r->connection);
       }
       else if (lenp) {
  @@ -2718,7 +2711,7 @@
   {
       int rv;
   
  -    if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_PASS)))
  +    if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)))
           return rv;
   
       /* In order to avoid sending 100 Continue when we already know the
  
  
  

Mime
View raw message