httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_charset_lite.c
Date Tue, 06 Jan 2004 18:59:23 GMT
bnicholes    2004/01/06 10:59:23

  Modified:    modules/experimental mod_charset_lite.c
  Log:
  Removed the #if #system(bs2000) condition since it is not compiler friendly on all compilers
(it breaks under Metrowerks on NetWare) but kept the patch that it contained.  Validated the
patch that moves opening of the xlation table from the fix-up stage to the output filter and
it all seemed to work fine.
  
  Revision  Changes    Path
  1.69      +12 -29    httpd-2.0/modules/experimental/mod_charset_lite.c
  
  Index: mod_charset_lite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_charset_lite.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- mod_charset_lite.c	1 Jan 2004 13:26:18 -0000	1.68
  +++ mod_charset_lite.c	6 Jan 2004 18:59:23 -0000	1.69
  @@ -307,16 +307,12 @@
                             "mime type is %s; no translation selected",
                             mime_type);
           }
  -#if #system(bs2000)
  -/* We must not bail out here (i.e., the MIME test must be in the filter
  - * itself, not in the fixup, because only then is the final MIME type known.
  - * Examples for late changes to the MIME type include CGI handling (MIME
  - * type is set in the Content-Type header produced by the CGI script), or
  - * PHP (until PHP runs, the MIME type is set to application/x-httpd-php)
  - */
  -#else
  -        return DECLINED;
  -#endif
  +        /* We must not bail out here (i.e., the MIME test must be in the filter
  +         * itself, not in the fixup, because only then is the final MIME type known.
  +         * Examples for late changes to the MIME type include CGI handling (MIME
  +         * type is set in the Content-Type header produced by the CGI script), or
  +         * PHP (until PHP runs, the MIME type is set to application/x-httpd-php)
  +         */
       }
   
       if (dc->debug >= DBGLVL_GORY) {
  @@ -340,24 +336,13 @@
   
       reqinfo->output_ctx = output_ctx;
   
  -#if #system(bs2000)
  -/* We must not open the xlation table here yet, because the final MIME
  - * type is not known until we are actually called in the output filter.
  - * With POST or PUT request, the case is different, because their MIME
  - * type is set in the request headers, and their data are prerequisites
  - * for actually calling, e.g., the CGI handler later on.
  - */
  +    /* We must not open the xlation table here yet, because the final MIME
  +     * type is not known until we are actually called in the output filter.
  +     * With POST or PUT request, the case is different, because their MIME
  +     * type is set in the request headers, and their data are prerequisites
  +     * for actually calling, e.g., the CGI handler later on.
  +     */
       output_ctx->xlate = NULL;
  -#else
  -    rv = apr_xlate_open(&output_ctx->xlate, 
  -                        dc->charset_default, dc->charset_source, r->pool);
  -    if (rv != APR_SUCCESS) {
  -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
  -                      "can't open translation %s->%s",
  -                      dc->charset_source, dc->charset_default);
  -        return HTTP_INTERNAL_SERVER_ERROR;
  -    }
  -#endif
   
       switch (r->method_number) {
       case M_PUT:
  @@ -878,7 +863,6 @@
           }
       }
   
  -#if #system(bs2000)
       /* Opening the output translation (this used to be done in the fixup hook,
        * but that was too early: a subsequent type modification, e.g., by a
        * CGI script, would go unnoticed. Now we do it in the filter itself.)
  @@ -926,7 +910,6 @@
                                     mime_type);
               }
       }
  -#endif
   
       if (dc->debug >= DBGLVL_GORY) {
           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
  
  
  

Mime
View raw message