httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_deflate.c
Date Thu, 07 Mar 2002 14:13:23 GMT
striker     02/03/07 06:13:23

  Modified:    modules/experimental mod_deflate.c
  Log:
  Cleanup some left behind style nits I missed and clean
  one up I just introduced :(.
  Add the standard comments to the module struct.
  
  Revision  Changes    Path
  1.10      +15 -13    httpd-2.0/modules/experimental/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_deflate.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_deflate.c	7 Mar 2002 13:12:59 -0000	1.9
  +++ mod_deflate.c	7 Mar 2002 14:13:23 -0000	1.10
  @@ -248,8 +248,8 @@
            * other than text/html, so set gzip-only-text/html
            * (with browsermatch) for them
            */
  -        if ((r->content_type == NULL ||
  -             strncmp(r->content_type, "text/html", 9))
  +        if ((r->content_type == NULL
  +             || strncmp(r->content_type, "text/html", 9))
               && apr_table_get(r->subprocess_env, "gzip-only-text/html")) {
               return ap_pass_brigade(f->next, bb);
           }
  @@ -288,8 +288,9 @@
           if (zRC != Z_OK) {
               f->ctx = NULL;
               ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r,
  -                        "unable to init Zlib: deflateInit2 returned %d: URL %s",
  -                        zRC, r->uri);
  +                          "unable to init Zlib: "
  +                          "deflateInit2 returned %d: URL %s",
  +                          zRC, r->uri);
               return ap_pass_brigade(f->next, bb);
           }
   
  @@ -316,12 +317,13 @@
               char crc_array[4], len_array[4];
               unsigned int deflate_len;
   
  -            ctx->stream.avail_in = 0;        /* should be zero already anyway */
  +            ctx->stream.avail_in = 0; /* should be zero already anyway */
               for (;;) {
                   deflate_len = FILTER_BUFSIZE - ctx->stream.avail_out;
   
                   if (deflate_len != 0) {
  -                    b = apr_bucket_heap_create((char *)ctx->buffer, deflate_len, 1);
  +                    b = apr_bucket_heap_create((char *)ctx->buffer,
  +                                               deflate_len, 1);
                       APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
                       ctx->stream.next_out = ctx->buffer;
                       ctx->stream.avail_out = FILTER_BUFSIZE;
  @@ -435,7 +437,7 @@
       return APR_SUCCESS;
   }
   
  -static void register_hooks(apr_pool_t * p)
  +static void register_hooks(apr_pool_t *p)
   {
       ap_register_output_filter(deflateFilterName, deflate_out_filter,
                                 AP_FTYPE_CONTENT_SET);
  @@ -453,10 +455,10 @@
   
   module AP_MODULE_DECLARE_DATA deflate_module = {
       STANDARD20_MODULE_STUFF,
  -    NULL,
  -    NULL,
  -    create_deflate_server_config,
  -    NULL,
  -    deflate_filter_cmds,
  -    register_hooks
  +    NULL,                         /* dir config creater */
  +    NULL,                         /* dir merger --- default is to override */
  +    create_deflate_server_config, /* server config */
  +    NULL,                         /* merge server config */
  +    deflate_filter_cmds,          /* command table */
  +    register_hooks                /* register hooks */
   };
  
  
  

Mime
View raw message