mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Add some comments on handling faulty mime documents.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28045 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2873065021
commit
c565583e6c
1 changed files with 13 additions and 3 deletions
|
@ -662,6 +662,11 @@ wordData(NSString *word)
|
||||||
* [GSMimeParser-mimeDocument] method returns the
|
* [GSMimeParser-mimeDocument] method returns the
|
||||||
* resulting parsed document.
|
* resulting parsed document.
|
||||||
* </p>
|
* </p>
|
||||||
|
* <p>If you need to parse faulty documents (eg where a faulty mail client
|
||||||
|
* has produced an email which does not conform to the MIME standards), you
|
||||||
|
* should look at the -setBuggyQotes: and -setDefaultCharset: methods, which
|
||||||
|
* are designed to cope with the most common faults.
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
@implementation GSMimeParser
|
@implementation GSMimeParser
|
||||||
|
|
||||||
|
@ -2212,10 +2217,15 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** This is a method to inform the parser that body parts with no content-type
|
||||||
* Method to inform the parser that body parts with no content-type
|
|
||||||
* header (which are treated as text/plain) should use the specified
|
* header (which are treated as text/plain) should use the specified
|
||||||
* characterset rather than the default (us-ascii)
|
* characterset rather than the default (us-ascii).<br />
|
||||||
|
* This also controls the parsing of headers ... in a legal MIME document
|
||||||
|
* these must consst solely of us-ascii characters, but setting a different
|
||||||
|
* default characterset (such as latin1) will permit many illegal header
|
||||||
|
* lines (produced by faulty mail clients) to be parsed.<br />
|
||||||
|
* HTTP requests use headers in the latin1 characterset, so this is the
|
||||||
|
* header line characterset used most commonly by faulty clients.
|
||||||
*/
|
*/
|
||||||
- (void) setDefaultCharset: (NSString*)aName
|
- (void) setDefaultCharset: (NSString*)aName
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue