commit e3f5717173e9ae8510606ccb208712894ff8c6c7
parent 60074d3c8558d25b17d21bd4d51a0117fea60c16
Author: boredpasta <boredpasta@tutanota.com>
Date: Mon, 17 Mar 2025 14:20:32 +0200
fix content-type detection failing when a text/html has extra items in response
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mata_bot.pl b/mata_bot.pl
@@ -97,7 +97,7 @@ sub respond {
msg($sock, "failed to get info about link: $url <[x~x]> (no ``content-type'' header found in HTTP response!)");
return 0;
}
- unless ($response->{headers}->{'content-type'} eq 'text/html') {
+ unless ($response->{headers}->{'content-type'} =~ m,text/html,) {
# we got a non text/html content type
msg($sock, "File: $response->{headers}->{'content-type'}");
return 0;