Comment: Update RFC 1864 "Content-MD5" newlines claims, we are correct.
authorshort <>
Mon, 19 Sep 2005 20:06:00 +0000 (20:06 +0000)
committershort <>
Mon, 19 Sep 2005 20:06:00 +0000 (20:06 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index bc0b293..de12860 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -992,9 +992,9 @@ sub cache_finish()
        my %headers_out;
        # Do not: $W->{"digest-md5"}->b64digest();
        # as it will not provide the trailing filling '='s.
-       # RFC 1864 is not clear but the same provides them.
-       # FIXME: Should we somehow provide "\r\n" newlines for the text data? Which content is "text"?
-       #        Maybe it does not apply to HTTP as RFC 1864 targets mail/MIME.
+       # RFC 1864 is not clear if they should be there but its sample provides them.
+       # Do not try to provide canonical "\r\n" form of newlines as is said by RFC 1864.
+       # RFC 2068 (HTTP/1.1) section 14.16 says the newlines should NOT be converted for HTTP.
        # ',""' to avoid breaking the headers by its default "\n".
        $headers_out{"Content-MD5"}=MIME::Base64::encode_base64($W->{"digest-md5"}->digest(),"");
        # In fact we could also use MD5 for ETag as if we know ETag we also know MD5.