OSDN Git Service

* dynamic converter bug.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Tue, 22 Jul 2008 12:33:07 +0000 (12:33 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Tue, 22 Jul 2008 12:33:07 +0000 (12:33 +0000)
    - no convert.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_12_0@3037 1a406e8e-add9-4483-a2c8-d8cac5b7c224

src/chxj_img_conv_format.c
src/mod_chxj.c

index 81f5afc..7846f4e 100644 (file)
@@ -397,6 +397,7 @@ s_img_conv_format_from_file(
   if (rv != APR_SUCCESS)
     return HTTP_NOT_FOUND;
 
+  apr_table_setn(r->headers_in, "CHXJ_IMG_CONV", "done");
   try_count = CACHE_RETRY_COUNT;
   do {
     rv = apr_stat(&cache_st, tmpfile, APR_FINFO_MIN, r->pool);
@@ -428,7 +429,6 @@ s_img_conv_format_from_file(
     WRN(r, "cache retry failure....");
     WRN(r, "cache file was deleted...");
   }
-  apr_table_setn(r->headers_in, "CHXJ_IMG_CONV", "done");
 
   DBG(r,"end chxj_img_conv_format");
 
@@ -1549,7 +1549,6 @@ s_send_cache_file(device_table *UNUSED(spec), query_string_param_t *query_string
   apr_file_t   *fout;
   apr_size_t   sendbyte;
   char         *contentLength;
-  char         *readData = NULL;
 
   rv = apr_stat(&st, tmpfile, APR_FINFO_MIN, r->pool);
   if (rv != APR_SUCCESS)
index 8083fca..6704d4e 100644 (file)
@@ -756,6 +756,7 @@ chxj_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
     &&  ! STRNCASEEQ('t','T',"text/xml", r->content_type, sizeof("text/xml")-1)
     &&  ! STRNCASEEQ('a','A',"application/xhtml+xml", r->content_type, sizeof("application/xhtml+xml")-1)
     &&  ! (dconf->image == CHXJ_IMG_ON
+          && ! apr_table_get(r->headers_in, "CHXJ_IMG_CONV")
           && STRNCASEEQ('i','I',"image/",  r->content_type, sizeof("image/") -1)
           && ( STRCASEEQ('j','J',"jpeg",            &r->content_type[6])         /* JPEG */
             || STRCASEEQ('j','J',"jp2",             &r->content_type[6])         /* JPEG2000 */
@@ -766,7 +767,7 @@ chxj_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
             || STRCASEEQ('x','X',"x-png",           &r->content_type[6])         /* PNG */
             || STRCASEEQ('g','G',"gif",             &r->content_type[6])))) {     /* GIF */
       
-      DBG(r, "not convert content-type:[%s]", r->content_type);
+      DBG(r, "not convert content-type:[%s] dconf->image:[%d]", r->content_type, dconf->image);
       if (entryp->action & CONVRULE_COOKIE_ON_BIT) {
         DBG(r, "entryp->action == COOKIE_ON_BIT");
         switch(spec->html_spec_type) {