]> granicus.if.org Git - apache/commitdiff
Get rid of the xlate version of ap_md5_digest()
authorJeff Trawick <trawick@apache.org>
Wed, 25 Oct 2000 18:54:20 +0000 (18:54 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 25 Oct 2000 18:54:20 +0000 (18:54 +0000)
since we don't compute digests of filtered (e.g., translated)
response bodies this way anymore.  (Note that we don't do it at
all at the present; somebody needs to write a filter to do so.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86750 13f79535-47bb-0310-9956-ffa450edef68

include/util_md5.h
modules/http/http_core.c
server/util_md5.c

index d5df9e17d5d3b2c613d42a0763ef0c0ed9ffbc58..3585a79bdf7334929774c3749af2bd6aca9e6177 100644 (file)
@@ -97,20 +97,13 @@ AP_DECLARE(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int le
  */
 AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context);
 
-#ifdef APACHE_XLATE
 /**
  * Create an MD5 Digest for a given file
  * @param p The pool to allocate out of
  * @param infile The file to create the digest for
- * @param xlate The translation header to use.
- * @warning The xlate parameter is only available if APACHE_XLATE is defined
- * @deffunc char *ap_md5digest(apr_pool_t *p, apr_file_t *infile, apr_xlate_t *xlate)
+ * @deffunc char *ap_md5digest(apr_pool_t *p, apr_file_t *infile)
  */
-AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile,
-                                apr_xlate_t *xlate);
-#else
 AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile);
-#endif
 
 #ifdef __cplusplus
 }
index 3226eff2840c5c9556d3d89f207033962569ee9f..350bad4ee94f85300e32edf5cc2656069c23329b 100644 (file)
@@ -3006,13 +3006,8 @@ static int default_handler(request_rec *r)
 #endif
 
         if (bld_content_md5) {
-#ifdef APACHE_XLATE
-           apr_table_setn(r->headers_out, "Content-MD5",
-                           ap_md5digest(r->pool, fd, NULL));
-#else
            apr_table_setn(r->headers_out, "Content-MD5",
                            ap_md5digest(r->pool, fd));
-#endif /* APACHE_XLATE */
        }
 
        rangestatus = ap_set_byterange(r);
index 47adc7c03779883d5ee36394561d474bf435e6c4..03cbb104b62b0a10d5327eb03b26e52318d282bc 100644 (file)
@@ -195,32 +195,6 @@ AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *a, apr_md5_ctx_t *context)
     return encodedDigest;
 }
 
-#ifdef APACHE_XLATE
-
-AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile,
-                                apr_xlate_t *xlate)
-{
-    apr_md5_ctx_t context;
-    unsigned char buf[1000];
-    long length = 0;
-    int nbytes;
-    apr_off_t offset = 0L;
-
-    apr_MD5Init(&context);
-    if (xlate) {
-        apr_MD5SetXlate(&context, xlate);
-    }
-    nbytes = sizeof(buf);
-    while (apr_read(infile, buf, &nbytes) == APR_SUCCESS) {
-       length += nbytes;
-       apr_MD5Update(&context, buf, nbytes);
-    }
-    apr_seek(infile, APR_SET, &offset);
-    return ap_md5contextTo64(p, &context);
-}
-
-#else
-
 AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile)
 {
     apr_md5_ctx_t context;
@@ -239,4 +213,3 @@ AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile)
     return ap_md5contextTo64(p, &context);
 }
 
-#endif