Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

Opera 49 creates invalid mhtml file

  • Opera 49 creates invalid mhtml file. Header may have the following structure:

    From: <Saved by Blink>
    X-Snapshot-Version: 1.0
    X-Snapshot-Title: =?utf-8?Q?=D0=AF=D0=BD=D0=B4=D0=B5=D0=BA=D1=81.=D0=9D=D0=BE=D0=B2=D0=BE=D1=81=D1=82=
    =D0=B8: =D0=93=D0=BB=D0=B0=D0=B2=D0=BD=D1=8B=D0=B5 =D0=BD=D0=BE=D0=B2=D0=BE=
    =D1=81=D1=82=D0=B8 =D1=81=D0=B5=D0=B3=D0=BE=D0=B4=D0=BD=D1=8F, =D1=81=D0=B0=
    =D0=BC=D1=8B=D0=B5 =D1=81=D0=B2=D0=B5=D0=B6=D0=B8=D0=B5 =D0=B8 =D0=BF=D0=BE=
    =D1=81=D0=BB=D0=B5=D0=B4=D0=BD=D0=B8=D0=B5 =D0=BD=D0=BE=D0=B2=D0=BE=D1=81=
    =D1=82=D0=B8 =D0=A0=D0=BE=D1=81=D1=81=D0=B8=D0=B8 =D0=BE=D0=BD=D0=BB=D0=B0=

    As you see content of X-Snapshot-Title is encoded with RFC 2047 but there are no leading spaces at the beginning of every new line of encoded string.

    RFC 2047 says: An 'encoded-word' may not be more than 75 characters long, including 'charset', 'encoding', 'encoded-text', and delimiters. If it is desirable to encode more text than will fit in an 'encoded-word' of 75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may be used.

    So existing mime parsers cannot correctly parse such files. Is it possible to fix algorithm of mhtml file creation?

  • MHTML Generation and Loading. As implemented in Chrome.
    Last Updated: Nov 21, 2017

    Note: the long title line can be split into multiple lines using soft line break “CRLF+SPACE/TAB” per RFC 2047. The soft line break “=CRLF” used to break long line in message body as defined in RFC 2045 should NOT be used.

  • Confirmed. It's missing the spaces. Happens in Chrome too, so this needs to be filed at

    And, just for comparison, here's what a few mail clients do with the title on

    Opera Mail:
    Subject: =?utf-8?B?U3ViamVjdDog0K/QvdC00LXQutGBLtCd0L7QstC+0YHRgtC4OiDQk9C70LA=?=
    Subject: =?UTF-8?B?0K/QvdC00LXQutGBLtCd0L7QstC+0YHRgtC4OiDQk9C70LDQstC90Ys=?=
    Subject: =?UTF-8?B?0K/QvdC00LXQutGBLtCd0L7QstC+0YHRgtC4OiDQk9C70LDQstC90YvQtSDQvdC+0LLQvg==?=

    They're not using quoted-printable, but no matter. They're using spaces (or tabs in the for line continuation.

Log in to reply

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.