require Encode;
use Apache2::Filter;
use Apache2::Connection;
+require MIME::Base64;
#our $W;
# Prepare 'headers_out' for the future reusal:
my %headers_out;
- $headers_out{"Content-MD5"}=$W->{"digest-md5"}->b64digest();
+ # 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"?
+ $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.
# But this way we do not need to calculate MD5 and we still can provide such ETag. So.
# $W->{"r"}->set_etag() ?