57#define CONTENT_TOO_BIG (1 << 30)
62 LOFF_T end_off,
bool digest,
int *counter);
111static void parse_parameters(
struct ParameterList *pl,
const char *s,
bool allow_value_spaces)
114 const char *p = NULL;
121 if (allow_value_spaces)
131 p = strpbrk(s,
"=;");
165 bool state_ascii =
true;
174 if ((s[1] ==
'(') && ((s[2] ==
'B') || (s[2] ==
'J')))
180 if (state_ascii && (*s ==
'"'))
201 for (; *s && *s !=
' ' && *s !=
';'; s++)
206 }
while (allow_value_spaces && (*s ==
' '));
227 if ((*s !=
';') && !(s = strchr(s,
';')))
362 if (!s || (*s ==
'\0'))
370 for (
const char *p = decoded, *beg = NULL; *p; p++)
378 if (beg && (*p ==
'>'))
381 *len = p - decoded + 1;
431 char *pc = strchr(s,
';');
435 while (*pc && isspace(*pc))
453 char *subtype = strchr(s,
'/');
457 for (pc = subtype; *pc && !isspace(*pc) && (*pc !=
';'); pc++)
493 char buf[128] = { 0 };
496 snprintf(buf,
sizeof(buf),
"x-%s", s);
534 autocrypt->
next = head;
597 for (
const char *beg = body, *end = NULL; beg; beg = strchr(end,
','))
599 beg = strchr(beg,
'<');
605 end = strchr(beg,
'>');
638 const char *name,
size_t name_len,
const char *body,
639 bool user_hdrs,
bool weed,
bool do_2047)
644 bool matched =
false;
646 switch (name[0] | 0x20)
649 if ((name_len == 13) &&
eqi12(name + 1,
"pparently-to"))
654 else if ((name_len == 15) &&
eqi14(name + 1,
"pparently-from"))
660 else if ((name_len == 9) &&
eqi8(name + 1,
"utocrypt"))
669 else if ((name_len == 16) &&
eqi15(name + 1,
"utocrypt-gossip"))
682 if ((name_len == 3) &&
eqi2(name + 1,
"cc"))
690 if ((name_len == 2) &&
eqi1(name + 1,
"c"))
697 if ((name_len >= 12) &&
eqi8(name,
"content-"))
699 if ((name_len == 12) &&
eqi4(name + 8,
"type"))
705 else if ((name_len == 16) &&
eqi8(name + 8,
"language"))
711 else if ((name_len == 25) &&
eqi17(name + 8,
"transfer-encoding"))
717 else if ((name_len == 14) &&
eqi8(name + 6,
"t-length"))
721 unsigned long len = 0;
726 else if ((name_len == 19) &&
eqi11(name + 8,
"description"))
735 else if ((name_len == 19) &&
eqi11(name + 8,
"disposition"))
746 if ((name_len != 4) || !
eqi4(name,
"date"))
752 struct Tz tz = { 0 };
765 if ((name_len == 7) &&
eqi6(name + 1,
"xpires") && e &&
773 if ((name_len == 4) &&
eqi4(name,
"from"))
778 else if ((name_len == 11) &&
eqi10(name + 1,
"ollowup-to"))
790 if ((name_len != 11) || !
eqi10(name + 1,
"n-reply-to"))
799 if ((name_len == 5) &&
eqi4(name + 1,
"ines"))
810 else if ((name_len == 9) &&
eqi8(name + 1,
"ist-post"))
821 if (c_auto_subscribe)
827 else if ((name_len == 14) &&
eqi13(name + 1,
"ist-subscribe"))
838 else if ((name_len == 16) &&
eqi15(name + 1,
"ist-unsubscribe"))
852 if ((name_len == 12) &&
eqi11(name + 1,
"ime-version"))
858 else if ((name_len == 10) &&
eqi9(name + 1,
"essage-id"))
867 if ((name_len >= 13) &&
eqi4(name + 1,
"ail-"))
869 if ((name_len == 13) &&
eqi8(name + 5,
"reply-to"))
876 else if ((name_len == 16) &&
eqi11(name + 5,
"followup-to"))
886 if ((name_len == 10) &&
eqi9(name + 1,
"ewsgroups"))
897 if ((name_len == 12) &&
eqi11(name + 1,
"rganization"))
905 if ((name_len == 10) &&
eqi9(name + 1,
"eferences"))
911 else if ((name_len == 8) &&
eqi8(name,
"reply-to"))
916 else if ((name_len == 11) &&
eqi10(name + 1,
"eturn-path"))
921 else if ((name_len == 8) &&
eqi8(name,
"received"))
925 char *d = strrchr(body,
';');
936 if ((name_len == 7) &&
eqi6(name + 1,
"ubject"))
942 else if ((name_len == 6) &&
eqi5(name + 1,
"ender"))
947 else if ((name_len == 6) &&
eqi5(name + 1,
"tatus"))
972 else if (e && (name_len == 10) &&
eqi1(name + 1,
"u") &&
973 (
eqi8(name + 2,
"persedes") ||
eqi8(name + 2,
"percedes")))
981 if ((name_len == 2) &&
eqi1(name + 1,
"o"))
989 if ((name_len == 8) &&
eqi8(name,
"x-status"))
1014 else if ((name_len == 7) &&
eqi6(name + 1,
"-label"))
1020 else if ((name_len == 12) &&
eqi11(name + 1,
"-comment-to"))
1026 else if ((name_len == 4) &&
eqi4(name,
"xref"))
1032 else if ((name_len == 13) &&
eqi12(name + 1,
"-original-to"))
1044 if (!matched && user_hdrs)
1082 char line[1024] = { 0 };
1087 if (!fgets(line,
sizeof(line), fp))
1106 size_t off = linelen - 1;
1107 if (line[off] ==
'\n')
1113 }
while (off && isspace(line[--off]));
1117 if ((ch !=
' ') && (ch !=
'\t'))
1127 while (((ch = fgetc(fp)) ==
' ') || (ch ==
'\t'))
1133 line[off + 1] =
' ';
1163 LOFF_T loc = e ? e->
offset : ftello(fp);
1191 LOFF_T line_start_loc = loc;
1199 p = strpbrk(lines,
": \t");
1200 if (!p || (*p !=
':'))
1202 char return_path[1024] = { 0 };
1210 else if (
is_from(lines, return_path,
sizeof(return_path), &t))
1224 size_t name_len = p - lines;
1226 char buf[1024] = { 0 };
1236 if (c_spam_separator)
1282 regmatch_t pmatch[1];
1339 bool matched =
false;
1351 c = strchr(line,
':');
1404 if (
id[cid_len - 1] ==
'>')
1405 id[cid_len - 1] =
'\0';
1471 subtype =
NONULL(subtype);
1487 const char *bound = NULL;
1488 static unsigned short recurse_level = 0;
1554 LOFF_T end_off,
bool digest,
int *counter)
1561 mutt_error(
_(
"multipart message has no boundary parameter"));
1565 char buf[1024] = { 0 };
1566 struct Body *head = NULL, *last = NULL, *new_body = NULL;
1570 while ((ftello(fp) < end_off) && fgets(buf,
sizeof(buf), fp))
1574 const size_t crlf = ((len > 1) && (buf[len - 2] ==
'\r')) ? 1 : 0;
1580 last->length = ftello(fp) - last->offset - len - 1 - crlf;
1581 if (last->parts && (last->parts->length == 0))
1582 last->parts->length = ftello(fp) - last->parts->offset - len - 1 - crlf;
1584 if (last->length < 0)
1591 for (
size_t i = len - 1; isspace(buf[i]) && (i >= (blen + 2)); i--)
1601 else if (buf[2 + blen] ==
'\0')
1611 for (; lines > 0; lines--)
1612 if ((ftello(fp) >= end_off) || !fgets(buf,
sizeof(buf), fp))
1617 if (new_body->offset > end_off)
1624 last->next = new_body;
1644 if (last && (last->length == 0) && !
final)
1645 last->
length = end_off - last->offset;
1648 for (last = head; last; last = last->
next)
1715 const char *tag = np->
name;
1736 char *scratch = NULL;
1740 scratch[taglen] = 0;
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
const char * mutt_str_atoul(const char *str, unsigned long *dst)
Convert ASCII string to an unsigned long.
const char * mutt_str_atoui(const char *str, unsigned int *dst)
Convert ASCII string to an unsigned integer.
const char * mutt_str_atoi(const char *str, int *dst)
Convert ASCII string to an integer.
Autocrypt end-to-end encryption.
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
size_t buf_len(const struct Buffer *buf)
Calculate the length of a Buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const struct Regex * cs_subset_regex(const struct ConfigSubset *sub, const char *name)
Get a regex config item by name.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
const struct Slist * cc_assumed_charset(void)
Get the cached value of $assumed_charset.
Convenience wrapper for the core headers.
void mutt_body_free(struct Body **ptr)
Free a Body.
struct Body * mutt_body_new(void)
Create a new Body.
struct Email * email_new(void)
Create a new Email.
struct ReplaceList SpamList
List of regexes to match subscribed mailing lists.
struct RegexList SubscribedLists
List of header patterns to unignore (see)
struct HashTable * AutoSubscribeCache
< Hash Table: "mailto:" -> AutoSubscribeCache
struct RegexList UnSubscribedLists
struct RegexList UnMailLists
List of regexes to exclude false matches in SubscribedLists.
struct RegexList MailLists
List of permitted fields in a mailto: url.
struct ListHead MailToAllow
List of regexes to identify non-spam emails.
struct ListHead Ignore
List of regexes to match mailing lists.
struct RegexList NoSpamList
List of regexes and patterns to match spam emails.
struct ListHead UnIgnore
List of regexes to exclude false matches in MailLists.
int mutt_rfc822_parse_line(struct Envelope *env, struct Email *e, const char *name, size_t name_len, const char *body, bool user_hdrs, bool weed, bool do_2047)
Parse an email header.
struct Body * mutt_rfc822_parse_message(FILE *fp, struct Body *b)
Parse a Message/RFC822 body.
void mutt_parse_part(FILE *fp, struct Body *b)
Parse a MIME part.
void mutt_parse_content_type(const char *s, struct Body *b)
Parse a content type.
void mutt_auto_subscribe(const char *mailto)
Check if user is subscribed to mailing list.
size_t mutt_rfc822_read_line(FILE *fp, struct Buffer *buf)
Read a header line from a file.
struct Body * mutt_read_mime_header(FILE *fp, bool digest)
Parse a MIME header.
static struct AutocryptHeader * parse_autocrypt(struct AutocryptHeader *head, const char *s)
Parse an Autocrypt header line.
static void parse_references(struct ListHead *head, const char *s)
Parse references from an email header.
bool mutt_matches_ignore(const char *s)
Does the string match the ignore list.
static char * rfc2369_first_mailto(const char *body)
Extract the first mailto: URL from a RFC2369 list.
enum ContentType mutt_check_mime_type(const char *s)
Check a MIME type string.
static struct Body * rfc822_parse_message(FILE *fp, struct Body *parent, int *counter)
Parse a Message/RFC822 body.
struct Envelope * mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed)
Parses an RFC822 header.
static void parse_content_language(const char *s, struct Body *b)
Read the content's language.
bool mutt_parse_mailto(struct Envelope *env, char **body, const char *src)
Parse a mailto:// url.
int mutt_check_encoding(const char *c)
Check the encoding type.
static void parse_content_disposition(const char *s, struct Body *b)
Parse a content disposition.
struct Body * mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, bool digest)
Parse a multipart structure.
char * mutt_extract_message_id(const char *s, size_t *len)
Find a message-id.
static void parse_part(FILE *fp, struct Body *b, int *counter)
Parse a MIME part.
static struct Body * parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, bool digest, int *counter)
Parse a multipart structure.
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
static void parse_parameters(struct ParameterList *pl, const char *s, bool allow_value_spaces)
Parse a list of Parameters.
Representation of an email.
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
struct Envelope * mutt_env_new(void)
Create a new Envelope.
struct AutocryptHeader * mutt_autocrypthdr_new(void)
Create a new AutocryptHeader.
void mutt_autocrypthdr_free(struct AutocryptHeader **ptr)
Free an AutocryptHeader.
Representation of an email header (envelope)
static bool eqi17(const char *a, const char b[17])
eqi17 - Compare two 17-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi9(const char *a, const char b[9])
eqi9 - Compare two 9-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi10(const char *a, const char b[10])
eqi10 - Compare two 10-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi8(const char *a, const char b[8])
Compare two 8-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons.
static bool eqi11(const char *a, const char b[11])
eqi11 - Compare two 11-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi6(const char *a, const char b[6])
eqi6 - Compare two 6-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi14(const char *a, const char b[14])
eqi14 - Compare two 14-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi13(const char *a, const char b[13])
eqi13 - Compare two 13-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi4(const char *a, const char b[4])
Compare two 4-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons.
static bool eqi5(const char *a, const char b[5])
eqi5 - Compare two 5-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi12(const char *a, const char b[12])
eqi12 - Compare two 12-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi15(const char *a, const char b[15])
eqi15 - Compare two 15-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons
static bool eqi1(const char *a, const char b[1])
Compare two 1-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons.
static bool eqi2(const char *a, const char b[2])
Compare two 2-byte strings, ignoring case - See: Case-insensitive fixed-chunk comparisons.
bool mutt_file_seek(FILE *fp, LOFF_T offset, int whence)
Wrapper for fseeko with error handling.
bool is_from(const char *s, char *path, size_t pathlen, time_t *tp)
Is a string a 'From' header line?
Determine who the email is from.
#define mutt_debug(LEVEL,...)
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
#define MUTT_HASH_STRDUP_KEYS
make a copy of the keys
#define MUTT_HASH_STRCASECMP
use strcasecmp() to compare keys
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
struct ListNode * mutt_list_insert_head(struct ListHead *h, char *s)
Insert a string at the beginning of a List.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
bool mutt_list_match(const char *s, struct ListHead *h)
Is the string in the list (see notes)
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG2
Log at debug level 2.
@ LL_DEBUG1
Log at debug level 1.
Constants and macros for managing MIME encoding.
@ ENC_UUENCODED
UUEncoded text.
@ ENC_OTHER
Encoding unknown.
@ ENC_BASE64
Base-64 encoded text.
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
#define MUTT_MIME_MAX_DEPTH
@ TYPE_AUDIO
Type: 'audio/*'.
@ TYPE_IMAGE
Type: 'image/*'.
@ TYPE_OTHER
Unknown Content-Type.
@ TYPE_MESSAGE
Type: 'message/*'.
@ TYPE_MODEL
Type: 'model/*'.
@ TYPE_MULTIPART
Type: 'multipart/*'.
@ TYPE_APPLICATION
Type: 'application/*'.
@ TYPE_TEXT
Type: 'text/*'.
@ TYPE_ANY
Type: '*' or '.*'.
@ TYPE_VIDEO
Type: 'video/*'.
@ DISP_ATTACH
Content is attached.
@ DISP_INLINE
Content is inline.
@ DISP_FORM_DATA
Content is form-data.
#define MUTT_MIME_MAX_PARTS
const char * mutt_ch_get_default_charset(const struct Slist *const assumed_charset)
Get the default character set.
int mutt_date_local_tz(time_t t)
Calculate the local timezone in seconds east of UTC.
time_t mutt_date_now(void)
Return the number of seconds since the Unix epoch.
time_t mutt_date_parse_date(const char *s, struct Tz *tz_out)
Parse a date string in RFC822 format.
Convenience wrapper for the library headers.
int mutt_regexlist_add(struct RegexList *rl, const char *str, uint16_t flags, struct Buffer *err)
Compile a regex string and add it to a list.
bool mutt_regex_capture(const struct Regex *regex, const char *str, size_t nmatch, regmatch_t matches[])
Match a regex against a string, with provided options.
bool mutt_replacelist_match(struct ReplaceList *rl, char *buf, size_t buflen, const char *str)
Does a string match a pattern?
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
bool slist_is_empty(const struct Slist *list)
Is the slist empty?
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
void mutt_str_remove_trailing_ws(char *s)
Trim trailing whitespace from a string.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
int mutt_str_asprintf(char **strp, const char *fmt,...)
char * mutt_str_skip_email_wsp(const char *s)
Skip over whitespace as defined by RFC5322.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
char * mutt_str_skip_whitespace(const char *p)
Find the first non-whitespace character in a string.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
bool mutt_istrn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings ignoring case (to a maximum), safely.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
char * mutt_param_get(const struct ParameterList *pl, const char *s)
Find a matching Parameter.
void mutt_param_set(struct ParameterList *pl, const char *attribute, const char *value)
Set a Parameter.
void mutt_param_free(struct ParameterList *pl)
Free a ParameterList.
struct Parameter * mutt_param_new(void)
Create a new Parameter.
Store attributes associated with a MIME part.
Miscellaneous email parsing routines.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define TAILQ_FOREACH(var, head, field)
#define STAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
#define TAILQ_INSERT_HEAD(head, elm, field)
void rfc2047_decode_envelope(struct Envelope *env)
Decode the fields of an Envelope.
void rfc2047_decode(char **pd)
Decode any RFC2047-encoded header fields.
RFC2047 MIME extensions encoding / decoding routines.
void rfc2231_decode_parameters(struct ParameterList *pl)
Decode a Parameter list.
RFC2231 MIME Charset routines.
Convenience wrapper for the send headers.
static bool mutt_str_is_email_wsp(char c)
Is this a whitespace character (for an email header)
char * language
content-language (RFC8255)
struct Body * parts
parts of a multipart or message/rfc822
LOFF_T offset
offset where the actual data begins
char * xtype
content-type if x-unknown
struct Envelope * mime_headers
Memory hole protected headers.
LOFF_T length
length (in bytes) of attachment
struct ParameterList parameter
Parameters of the content-type.
struct Email * email
header information for message/rfc822
char * description
content-description
unsigned int disposition
content-disposition, ContentDisposition
struct Body * next
next attachment in the list
char * subtype
content-type subtype
unsigned int encoding
content-transfer-encoding, ContentEncoding
long hdr_offset
Offset in stream where the headers begin.
char * form_name
Content-Disposition form-data name param.
unsigned int type
content-type primary type, ContentType
char * filename
When sending a message, this is the file to which this structure refers.
String manipulation buffer.
char * data
Pointer to data.
The envelope/body of an email.
unsigned int zminutes
Minutes away from UTC.
struct Envelope * env
Envelope information.
bool mime
Has a MIME-Version header?
int lines
How many lines in the body of this message?
struct Body * body
List of MIME parts.
bool old
Email is seen, but unread.
bool zoccident
True, if west of UTC, False if east.
LOFF_T offset
Where in the stream does this message begin?
bool flagged
Marked important?
unsigned int zhours
Hours away from UTC.
time_t date_sent
Time when the message was sent (UTC)
bool replied
Email has been replied to.
bool expired
Already expired?
bool deleted
Email is deleted.
time_t received
Time when the message was placed in the mailbox.
struct ListHead userhdrs
user defined headers
char * supersedes
Supersedes header.
char * list_subscribe
This stores a mailto URL, or nothing.
struct AddressList return_path
Return path for the Email.
struct AddressList to
Email's 'To' list.
char * followup_to
List of 'followup-to' fields.
struct AddressList reply_to
Email's 'reply-to'.
char * message_id
Message ID.
char * x_comment_to
List of 'X-comment-to' fields.
struct AddressList x_original_to
Email's 'X-Orig-to'.
struct AutocryptHeader * autocrypt_gossip
Autocrypt Gossip header.
char * newsgroups
List of newsgroups.
struct AddressList mail_followup_to
Email's 'mail-followup-to'.
struct AddressList cc
Email's 'Cc' list.
struct AddressList sender
Email's sender.
struct ListHead references
message references (in reverse order)
struct AutocryptHeader * autocrypt
Autocrypt header.
struct Buffer spam
Spam header.
struct ListHead in_reply_to
in-reply-to header content
char * subject
Email's subject.
struct AddressList bcc
Email's 'Bcc' list.
char * xref
List of cross-references.
char * organization
Organisation header.
char * list_post
This stores a mailto URL, or nothing.
char * real_subj
Offset of the real subject.
char * list_unsubscribe
This stores a mailto URL, or nothing.
struct AddressList from
Email's 'From' list.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Attribute associated with a MIME part.
char * attribute
Parameter name.
char * value
Parameter value.
Cached regular expression.
List of recognised Timezones.
unsigned char zminutes
Minutes away from UTC.
bool zoccident
True if west of UTC, False if East.
unsigned char zhours
Hours away from UTC.
A parsed URL proto://user:password@host:port/path?a=1&b=2
struct UrlQueryList query_strings
List of query strings.
char * src
Raw URL string.
struct Url * url_parse(const char *src)
Fill in Url.
void url_free(struct Url **ptr)
Free the contents of a URL.
enum UrlScheme url_check_scheme(const char *str)
Check the protocol of a URL.
Parse and identify different URL schemes.
@ U_MAILTO
Url is mailto://.