Author: rfm
Date: Sun Aug 28 11:53:38 2016
New Revision: 40065
URL: http://svn.gna.org/viewcvs/gnustep?rev=40065&view=rev
Log:
Fix typo causing preamature termination of long headers
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Source/Additions/GSMime.m
libs/base/trunk/Tests/base/GSMime/general.m
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=40065&r1=40064&r2=40065&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Sun Aug 28 11:53:38 2016
@@ -1,3 +1,8 @@
+2016-08-28 Richard Frith-Macdonald <[email protected]>
+
+ * Source/GSMime.m: Fix typo which was causing premature termination of
+ long headers.
+
2016-08-19 Richard Frith-Macdonald <[email protected]>
* config/objc-common.g: Darwin patch by David Wetzel
Modified: libs/base/trunk/Source/Additions/GSMime.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/Additions/GSMime.m?rev=40065&r1=40064&r2=40065&view=diff
==============================================================================
--- libs/base/trunk/Source/Additions/GSMime.m (original)
+++ libs/base/trunk/Source/Additions/GSMime.m Sun Aug 28 11:53:38 2016
@@ -4103,7 +4103,7 @@
*/
[m appendBytes: ptr + pos length: next - pos];
offset += next - pos;
- pos += next;
+ pos = next;
if (pos < len)
{
/* We have more text to output, so fold the line.
Modified: libs/base/trunk/Tests/base/GSMime/general.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Tests/base/GSMime/general.m?rev=40065&r1=40064&r2=40065&view=diff
==============================================================================
--- libs/base/trunk/Tests/base/GSMime/general.m (original)
+++ libs/base/trunk/Tests/base/GSMime/general.m Sun Aug 28 11:53:38 2016
@@ -72,12 +72,18 @@
GSMimeParser *parser;
GSMimeDocument *doc;
GSMimeDocument *idoc;
+ GSMimeHeader *hdr;
BOOL oldStyleFolding;
oldStyleFolding = [[NSUserDefaults standardUserDefaults]
boolForKey: @"GSMimeOldStyleFolding"];
cr = [NSData dataWithBytes: "\r" length: 1];
+
+ hdr = [GSMimeHeader headerWithName: @"From"
+ value: @"Maurizio Buratti is testing the lenght of the field so it doesn't
create issues with email sending
<[email protected]>" parameters: nil];
+ data = [hdr rawMimeData];
+ PASS_EQUAL([data description], @"<46726f6d 3a204d61 7572697a 696f2042
75726174 74692069 73207465 7374696e 67207468 65206c65 6e676874 206f6620
74686520 6669656c 6420736f 20697420 646f6573 6e27740d 0a206372 65617465
20697373 75657320 77697468 20656d61 696c2073 656e6469 6e670d0a 203c656d
61696c74 65737469 6e674065 6d61696c 74657374 2d647261 676f6e74 65737432
2e627261 696e7374 6f726d2e 636f2e75 6b3e0d0a>", "encode long header ok");
data = [NSData dataWithBytes: "DQ==" length: 4];
PASS_EQUAL([GSMimeDocument decodeBase64: data], cr,
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs