|
Library renamed to DIMime. Unit rjMime.pas renamed to DIMime.pas.
Separated the main unit into two units: DIMime.pas now has no dependencies (except System.pas). All stream routines which require Classes.pas are now in DIMimeStreams.pas. This allows for smaller CIG console applications if Classes.pas is not needed.
DIMimeStreams.pas also contains 3 new routines for working with files:
procedure MimeEncodeFile(const InputFileName, OutputFileName: AnsiString);
procedure MimeEncodeFileNoCRLF(const InputFileName, OutputFileName: AnsiString);
procedure MimeDecodeFile(const InputFileName, OutputFileName: AnsiString);
Fixed a bug in MimeEncodedSize which returned a wrong result when InputSize was zero. This could caused a problem when streams were not reset before encoding.
Small speed improvements of encoding routines.
Miscellaneous enhancements.
Added support for line breaks (CRLF) during Mime encoding as required by RFC 2045. Since inserting line breaks is the default in RFC 2045, I changed the standard encoding functions to encode WITH line breaks. This may require changes to your code: Encoding without inserting line breaks is still provided by the …NoCRLF procedures.
If you migrate from rjMime 1.31 to rjMime 1.50, you might need to adjust your code depending on the required results. If you don't want to change any behaviour as compared to earlier versions of rjMime, simply add "NoCRLF" to all calls to Mime encoding functions.
Please note that there is no MimeDecodeNoCRLF equivalent since the decoding routines skip line breaks and white space anyway.
New DecodeHttpBasicAuthentication procedure according to RFC 1945. See description in help file for deatils.
Version 1.50 also fixes a critical bug in MimeDecode (added missing @). This bug did not affect any of the other functions.
Changed the interface part to the core encoding and decoding routines from Pointer to Untyped. This way they no longer have to check if the pointers are not nil.
Replaced all Integer types with Cardinal types where the sign was not needed (which was in all cases).
-
Bugfix for MimeEncodeStream: Wrong BUFFER_SIZE resulted in additional bytes stuffed inbetween the OutBuffer.
Changed the order of the variables in the MimeEncode interface (moved InputBytesCount from last to 2nd, just after InputBuffer). Sorry for the inconvenience, but this way it is more consistent with MimeDecode. Now MimeEncode has the following variable order:
procedure MimeEncode (const InputBuffer: Pointer; const InputBytesCount: Integer; const OutputBuffer: Pointer);
MimeDecode: Interface chage to make it a function: It now returns the number of bytes written to the output buffer not as a var but as the result of a function. This way coding is made simpler since not OutputCount variable needs to be defined.
Introduced two new functions mostly for internal use:
MimeDecodePartial This is necessary to decode large blocks of data in multiple parts. On initialization, call MimeDecodePartial with ByteBuffer := 0 and ByteBufferSpace := 4. Then repeatedly call it again with new data loaded into the buffer. At the end of all data,
MimeDecodePartialEnd writes the remaining bytes from ByteBuffer to the outputbuffer (see MimeDecodeStream for an example).
MimeDecodePartial_ are necessary to decode inconsitent data (with linebreaks, tabs, whitespace) in multiple parts like in MimeDecodeStream.
Fixed a bug in MIME_DECODE_TABLE which caused wrong results decoding binary files.
products/mime/history.txt · Last modified: 2007/12/21 16:14 (external edit)
|