delete $args{"undef"};
cluck join(" ","Invalid arguments:",keys(%args)) if keys(%args);
return if !defined $text;
- cluck "utf-8 untested" if Encode::is_utf8($text);
+ # Do not: cluck "utf-8 untested" if Encode::is_utf8($text);
+ # as it is valid here.
$W->{"r"}->puts($text);
}
# 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());
+ # ',""' 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.
# But this way we do not need to calculate MD5 and we still can provide such ETag. So.
# $W->{"r"}->set_etag() ?