Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Default the decode function if not available

  • Loading branch information...
commit b28fae268ef364d9b38d73476679e48d9dfe631e 1 parent 01c257c
@baudehlo authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 mailbody.js
View
4 mailbody.js
@@ -94,6 +94,10 @@ Body.prototype.parse_start = function (line) {
enc = enc.toLowerCase().split("\n").pop().trim();
this.decode_function = this["decode_" + enc];
+ if (!this.decode_function) {
+ logger.logerror("No decode function found for: " + enc);
+ this.decode_function = this.decode_8bit;
+ }
this.ct = ct;
if (/^(?:text|message)\//i.test(ct) && !/^attachment/i.test(cd) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.