return log_script(r, conf, ret, dbuf, sbuf, script_in, script_err);
}
-#ifdef CHARSET_EBCDIC
- /* Now check the Content-Type to decide if conversion is needed */
- ap_checkconv(r);
-#endif /*CHARSET_EBCDIC*/
-
location = ap_table_get(r->headers_out, "Location");
if (location && location[0] == '/' && r->status == 200) {
return log_script(r, conf, ret, dbuf, sbuf, script, NULL);
}
-#ifdef CHARSET_EBCDIC
- /* Now check the Content-Type to decide if conversion is needed */
- ap_checkconv(r);
-#endif /*CHARSET_EBCDIC*/
-
location = ap_table_get(r->headers_out, "Location");
if (location && location[0] == '/' && r->status == 200) {
}
#ifdef CHARSET_EBCDIC
- /* By default, we convert all content. ap_checkconv() can decide
- * that conversion shouldn't be performed. Also, if the content type
- * contains the "magic" prefix for serving raw ascii
- * (text/x-ascii-{plain,html,...}), the type is corrected to the real
- * text/{plain,html,...} type which goes into the headers.
- */
- ap_checkconv(r);
-#endif
+ if (d->content_md5 & 1) {
+ /* The call to ap_checkconv() in ap_send_http_header() is
+ * sufficient for most paths. Sending the MD5 digest in a
+ * header is special in that any change to translation decided
+ * by ap_checkconv() must be done before building that header,
+ * and thus before calling ap_send_http_header().
+ */
+ ap_checkconv(r);
+ }
+#endif /* CHARSET_EBCDIC */
+
#ifdef USE_MMAP_FILES
if ((r->finfo.size >= MMAP_THRESHOLD)
&& (r->finfo.size < MMAP_LIMIT)
return;
}
+#ifdef CHARSET_EBCDIC
+ /* By default, we convert all content. ap_checkconv() can decide
+ * that conversion shouldn't be performed. Also, if the content type
+ * contains the "magic" prefix for serving raw ascii
+ * (text/x-ascii-{plain,html,...}), the type is corrected to the real
+ * text/{plain,html,...} type which goes into the headers.
+ * This may not seem like the best place to put this call, but doing
+ * it here avoids having to call it in every handler (which is
+ * particularly hard to do with handlers in modules which aren't
+ * part of the Apache httpd distribution).
+ */
+ ap_checkconv(r);
+#endif
+
/*
* Now that we are ready to send a response, we need to combine the two
* header field tables into a single table. If we don't do this, our