Warn of unencoded 8bit characters in header or body if -d is set.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
1e7bccbbec
commit
cc881f7897
2 changed files with 11 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ yapfaq 1.1.0 (unreleased)
|
||||||
* Accept a posting-frequency of "never", too.
|
* Accept a posting-frequency of "never", too.
|
||||||
* Check for illegal headers and stop posting, if found.
|
* Check for illegal headers and stop posting, if found.
|
||||||
* Disabled projects must be posted, if forced.
|
* Disabled projects must be posted, if forced.
|
||||||
|
* Warn of unencoded 8bit characters in header or body if -d is set.
|
||||||
|
|
||||||
yapfaq 1.0.1 (2025-01-24)
|
yapfaq 1.0.1 (2025-01-24)
|
||||||
* Add %t placeholder for Message-ID (feature parity with 0.9).
|
* Add %t placeholder for Message-ID (feature parity with 0.9).
|
||||||
|
|
|
||||||
|
|
@ -430,6 +430,16 @@ sub BuildPosting {
|
||||||
# add User-Agent
|
# add User-Agent
|
||||||
push @Headers, "User-Agent: $NAME/$VERSION\n";
|
push @Headers, "User-Agent: $NAME/$VERSION\n";
|
||||||
|
|
||||||
|
# check for unencoded 8bit characters in header or body in --debug mode
|
||||||
|
# taken from tinews.pl
|
||||||
|
if ($Config{'debug'}) {
|
||||||
|
print "- Raw 8-bit data in headers.\n" if (grep {/[\x80-\xff]/} @Headers);
|
||||||
|
# check for MIME headers and warn for 8bit characters in body if missing
|
||||||
|
if (!defined($Header{'mime-version'}) || !defined($Header{'content-type'})) {
|
||||||
|
print "- 8bit data in body without MIME-headers.\n" if (grep {/[\x80-\xff]/} @Body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# parse pseudo headers from body
|
# parse pseudo headers from body
|
||||||
my ($InRealBody,$LastModified,$PostingFrequency);
|
my ($InRealBody,$LastModified,$PostingFrequency);
|
||||||
foreach (@Body) {
|
foreach (@Body) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue