Hello. support,

I found one small issue with attachment content-disposition field.
Sometimes it looks like:

Content-Disposition: attachment; size=78529; filename=Image.png

So  procedure  TMimeDecode.ProcessPartHeaderLine  should be changed as
followind to fill correctly FPartFileName field:

    else if KeyWord = 'content-disposition' then begin
        p := GetTokenEx(p, FPartDisposition, Delim);
        while Delim = ';' do begin
            p := GetToken(p, Token, Delim);
            if Delim = '=' then begin
                if p^ = #34 then
                  p := GetQuoted(p, Value)
                  p := GetToken(p, Value, Delim);
                if Token = 'filename' then
                    FPartFileName := UnfoldHdrValue(Value);

Best regards,
 Alexander                          mailto:supp...@delphihtmlcomponents.com

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to