httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_deflate.c
Date Sun, 04 Jul 2004 21:34:37 GMT
nd          2004/07/04 14:34:37

  Modified:    modules/filters mod_deflate.c
  Log:
  style
  
  Revision  Changes    Path
  1.53      +31 -32    httpd-2.0/modules/filters/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -u -r1.52 -r1.53
  --- mod_deflate.c	3 Jul 2004 17:41:09 -0000	1.52
  +++ mod_deflate.c	4 Jul 2004 21:34:37 -0000	1.53
  @@ -33,7 +33,6 @@
   #define RESERVED     0xE0 /* bits 5..7: reserved */
   
   
  -
   #include "httpd.h"
   #include "http_config.h"
   #include "http_log.h"
  @@ -881,8 +880,8 @@
   static apr_status_t inflate_out_filter(ap_filter_t *f,
                                         apr_bucket_brigade *bb)
   {
  -    int zlib_method ;
  -    int zlib_flags ;
  +    int zlib_method;
  +    int zlib_flags;
       int deflate_init = 1; 
       apr_bucket *bkt;
       request_rec *r = f->r;
  @@ -972,7 +971,7 @@
               zRC = inflate(&(ctx->stream), Z_SYNC_FLUSH);
               if (zRC != Z_OK) {
                   ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
  -                    "Inflate error %d on flush", zRC) ;
  +                              "Inflate error %d on flush", zRC);
                   inflateEnd(&ctx->stream);
                   return APR_EGENERAL;
               }
  @@ -995,53 +994,53 @@
           apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ);
   
           /* first bucket contains zlib header */
  -        if ( ! deflate_init++ ) {
  -            if ( len < 10 ) {
  +        if (!deflate_init++) {
  +            if (len < 10) {
                   ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                                 "Insufficient data for inflate");
  -                return APR_EGENERAL ;
  +                return APR_EGENERAL;
               } 
               else  {
  -                zlib_method = data[2] ;
  -                zlib_flags = data[3] ;
  -                if ( zlib_method != Z_DEFLATED ) {
  +                zlib_method = data[2];
  +                zlib_flags = data[3];
  +                if (zlib_method != Z_DEFLATED) {
                       ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
  -                        "inflate: data not deflated!") ;
  -                    ap_remove_output_filter(f) ;
  -                    return ap_pass_brigade(f->next, bb) ;
  +                                  "inflate: data not deflated!");
  +                    ap_remove_output_filter(f);
  +                    return ap_pass_brigade(f->next, bb);
                   }
                   if (data[0] != deflate_magic[0] ||
                       data[1] != deflate_magic[1] ||
  -                    (zlib_flags & RESERVED) != 0 ) {
  +                    (zlib_flags & RESERVED) != 0) {
                           ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
  -                                      "deflate: bad header");
  +                                      "inflate: bad header");
                       return APR_EGENERAL ;
                   }
                   data += 10 ;
                   len -= 10 ;
              }
  -           if ( zlib_flags & EXTRA_FIELD) {
  -               unsigned int bytes =
  -                        (unsigned int)(data[0]) ;
  -               bytes += ((unsigned int)(data[1])) << 8 ;
  -               bytes += 2 ;
  -               if ( len < bytes ) {
  +           if (zlib_flags & EXTRA_FIELD) {
  +               unsigned int bytes = (unsigned int)(data[0]);
  +               bytes += ((unsigned int)(data[1])) << 8;
  +               bytes += 2;
  +               if (len < bytes) {
                      ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
  -                              "inflate: extra field too big (not supported)") ;
  -                   return APR_EGENERAL ;
  +                                 "inflate: extra field too big (not "
  +                                 "supported)");
  +                   return APR_EGENERAL;
                  }
  -               data += bytes ;
  -               len -= bytes ;
  +               data += bytes;
  +               len -= bytes;
              }
  -           if ( zlib_flags & ORIG_NAME) {
  -               while ( len-- && *data++ ) ;
  +           if (zlib_flags & ORIG_NAME) {
  +               while (len-- && *data++);
              }
  -           if ( zlib_flags & COMMENT) {
  -               while ( len-- && *data++ ) ;
  +           if (zlib_flags & COMMENT) {
  +               while (len-- && *data++);
              }
  -           if ( zlib_flags & HEAD_CRC) {
  -                len -= 2 ;
  -                data += 2 ;
  +           if (zlib_flags & HEAD_CRC) {
  +                len -= 2;
  +                data += 2;
              }
           }
   
  
  
  

Mime
View raw message