aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-12 04:57:26 +0800
committerDan Winship <danw@src.gnome.org>2001-05-12 04:57:26 +0800
commitba099582f365aa886cf426c4b7c422244ccec2e4 (patch)
tree048f51bf50cc32bba92dad2ca6ef2fe0ede0af86 /camel/camel-mime-utils.c
parent96dab8cb1934bfd4d0240d1aa9c2ca0e45a9edbb (diff)
downloadgsoc2013-evolution-ba099582f365aa886cf426c4b7c422244ccec2e4.tar.gz
gsoc2013-evolution-ba099582f365aa886cf426c4b7c422244ccec2e4.tar.zst
gsoc2013-evolution-ba099582f365aa886cf426c4b7c422244ccec2e4.zip
Decode Content-Location, either correctly or Netscape-generated-brokenly.
* camel-mime-utils.c (header_location_decode): Decode Content-Location, either correctly or Netscape-generated-brokenly. * camel-mime-part.c (camel_mime_part_set_content_location, camel_mime_part_get_content_location, etc): Deal with Content-Location header. svn path=/trunk/; revision=9772
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 7e486689ef..fbfbb3e5be 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -2842,6 +2842,32 @@ header_decode_date(const char *in, int *saveoffset)
return t;
}
+char *
+header_location_decode(const char *in)
+{
+ const char *p;
+
+ /* Sigh. RFC2557 says:
+ * content-location = "Content-Location:" [CFWS] URI [CFWS]
+ * where URI is restricted to the syntax for URLs as
+ * defined in Uniform Resource Locators [URL] until
+ * IETF specifies other kinds of URIs.
+ *
+ * But Netscape puts quotes around the URI when sending web
+ * pages.
+ */
+
+ header_decode_lwsp(&in);
+ if (*in == '"')
+ return header_decode_quoted_string(&in);
+ else {
+ for (p = in; *p && !is_lwsp(*p); p++)
+ ;
+ return g_strndup(in, p - in);
+ }
+}
+
+
/* extra rfc checks */
#define CHECKS
/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/net/gssdp?h=gnome-3.28&id=0d2a48b60f36b402cf0b34b99cfe05cda0396ebf'>- Update to 0.14.14sunpoet2016-03-062-3/+3 * - Update to 0.14.13sunpoet2016-01-192-3/+3 * - Update to 0.14.12.1sunpoet2015-12-043-4/+3 * - Update to 0.14.12sunpoet2015-11-243-15/+3 * - Add VALA optionsunpoet2015-09-082-2/+8 * - Use INSTALL_TARGET=install-strip instead of MAKE_ENV=INSTALL_STRIP_FLAG=${S...sunpoet2015-01-181-1/+1 * - Update to 0.14.11sunpoet2015-01-062-6/+3 * - Cleanup PLISTsunpoet2014-10-021-6/+0 * - Update to 0.14.10sunpoet2014-08-162-3/+3 * - Respect BSD.gnome.distsunpoet2014-07-281-2/+0 * - Update to 0.14.9sunpoet2014-07-262-3/+3 * - Update to 0.14.8sunpoet2014-05-263-4/+6 * - Use USES=libtoolsunpoet2014-05-202-2/+3 * - Use USES=tar:xzsunpoet2014-03-141-2/+1 * - Update to 0.14.7sunpoet2014-02-052-3/+3 * - Disable VAPIGEN completelysunpoet2013-12-281-1/+1 * - Update to 0.14.6sunpoet2013-11-032-3/+3 * - Strip shared librarysunpoet2013-10-251-0/+1 * - Convert to new options helpersunpoet2013-10-191-11/+3 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - Update to 0.14.5sunpoet2013-09-072-4/+4 * - Update to 0.14.4sunpoet2013-08-102-3/+3 * - Make use of USE_GNOME=introspectionsunpoet2013-08-101-3/+2 * - Update to 0.14.3sunpoet2013-06-093-12/+12 * Finish converting the whole ports tree to USES=pkgconfigbapt2013-04-231-2/+1 * - Add missing USE_PKGCONFIG=buildsunpoet2013-04-221-0/+1 * - Fix PLISTsunpoet2013-04-171-1/+1 * - Update to 0.14.2sunpoet2013-03-232-4/+8 * - Update to 0.13.0sunpoet2012-10-082-8/+4 * - Update to 0.12.2sunpoet2012-08-203-4/+3 * - Convert to new options frameworksunpoet2012-07-181-2/+3 * - Update to 0.12.1sunpoet2012-06-135-34/+37 * - update png to 1.5.10dinoex2012-06-011-1/+1 * Fix MASTER_SITEbapt2011-03-142-2/+1