According to Rfc6266 / Appendix C.1 RFC 2047 (MIME Part Three: Message Header Extensions for Non-ASCII Text), Section 2. Syntax of encoded-words ( page 3 ) :

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.

Original pull request : https://github.com/spring-projects/spring-framework/pull/26463 , try to decode base64 encoded filename, but he forget there is more segments case.

And thanks @guangtuan find it.

Comment From: pivotal-cla

@lxbzmy Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@lxbzmy Thank you for signing the Contributor License Agreement!

Comment From: poutsma

Thank you for submitting a PR! I have made some minor improvements, and also added support for multiple quoted printable segments. See efafccd.