hi
i got an email from yahoo (not a spam) and the attachment part had the
following headers:
--0-1295731844-1203339914=:5194--
--0-900209648-1203339914=:5194
Content-Type: application/x-zip-compressed; name=UNKNOWN_PARAMETER_VALUE
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?utf-8?q?my=20UI=20Proposal.zip?="
in procedure TMIMEPart.DecodePartHeader; there is:
if Pos('CONTENT-TYPE:', su) = 1 then
begin
st := Trim(SeparateRight(su, ':'));
st2 := Trim(SeparateLeft(st, ';'));
Primary := Trim(SeparateLeft(st2, '/'));
FSecondary := Trim(SeparateRight(st2, '/'));
if (FSecondary = Primary) and (Pos('/', st2) < 1) then
FSecondary := '';
case FPrimaryCode of
MP_TEXT:
begin
Charset := UpperCase(GetParameter(s, 'charset'));
FFileName := GetParameter(s, 'name');
end;
MP_MULTIPART:
FBoundary := GetParameter(s, 'Boundary');
MP_MESSAGE:
begin
end;
MP_BINARY:
FFileName := GetParameter(s, 'name'); <--- here FFilename
contains: UNKNOWN_PARAMETER_VALUE
end;
end;
later in this procedure
if Pos('CONTENT-DISPOSITION:', su) = 1 then
begin
FDisposition := SeparateRight(su, ':');
FDisposition := Trim(SeparateLeft(FDisposition, ';'));
fn := GetParameter(s, 'FileName'); <---- here fn contains the
correct filename
end;
later in this procedure:
if FFileName = '' then
FFileName := fn;
since FFilename is not a blank string, it remains with the wrong filename even
though fn contains the correct one
is this a bug, or again, yahoo is to blame?
mayb to overcome this issue, FFilename should get the fn value anyway?
please advice-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public