2014-07-14 7 views
0

the RFC 2045에는 quoted-printable (QP)의 줄이 76자를 초과해서는 안되지만 모든 클라이언트가이 요구 사항을 따르는 것은 아닙니다. 아니면 RFC의 요구 사항을 오해 할 수 있습니까?quoted-printable에서 76 문자 규칙에 따라 줄 바꿈을 구성하는 것은 무엇입니까?

는 실제 메일 메시지에서 다음 몇 줄을 고려

<style type=3D"text/css">=0Abody,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }=0A</style>=0A<body style=3D"background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sa= 
ns-serif; font-size:12px; margin:0; padding:0;">=0D=0A<div style=3D"background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">=0D=0A<table cellspacin= 
g=3D"0" cellpadding=3D"0" border=3D"0" width=3D"100%">=0D=0A<tr>=0D=0A <td align=3D"center" valign=3D"top" style=3D"padding:20px 0 20px 0">=0D=0A  <!-- [ header starts here] -->=0D=0A  = 

각 줄은 201 개 문자를 더한 CRLF이다. 그러나 LF로 변환되는 여러 개의 =0A 시퀀스가 ​​있습니다. 그렇다면이 메시지를 구문 분석 할 수 있어야하거나 거부 할 수 있습니까?

는 RFC의 다음 말씀을 위반하는 나에게 보인다,하지만 난 100 % 확신하지 않다 : 가장 긴 라인이 128 개 문자가 포함되어 있지만

(5) (Soft Line Breaks) The Quoted-Printable encoding 
     REQUIRES that encoded lines be no more than 76 
     characters long. If longer lines are to be encoded 
     with the Quoted-Printable encoding, "soft" line breaks 
     must be used. An equal sign as the last character on a 
     encoded line indicates such a non-significant ("soft") 
     line break in the encoded text. 

답변

2

당신은이 메시지를 구문 분석 할 수 있어야합니다.

이 메시지에는 =0A=SPACE 개의 시퀀스가 ​​있습니다.
=0A은 의미있는 줄 바꿈이고 =SPACE은 부드러운 줄 바꿈입니다.

(4) (Line Breaks) A line break in a text body, represented 
     as a CRLF sequence in the text canonical form, must be 
     represented by a (RFC 822) line break, which is also a 
     CRLF sequence, in the Quoted-Printable encoding. (...) 

     Note that many implementations may elect to encode the 
     local representation of various content types directly 
     rather than converting to canonical form first, 
     encoding, and then converting back to local 
     representation. In particular, this may apply to plain 
     text material on systems that use newline conventions 
     other than a CRLF terminator sequence. Such an 
     implementation optimization is permissible, but only 
     when the combined canonicalization-encoding step is 
     equivalent to performing the three steps separately. 
:
하드 줄 바꿈은 CRLF ( =0D=0A)하지만 (CR없이) 2045
만 허용 LF 너무 링크 된 RFC해야한다