c53cbc4b78d3627b78dbfbe1e4c3dd22ccef34f8
diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
index 01b0b19..a49e950 100644
--- a/libsoup/soup-cookie-jar.c
+++ b/libsoup/soup-cookie-jar.c
@@ -368,3 +368,44 @@ soup_cookie_jar_all_cookies (SoupCookieJar *jar)
 
 	return l;
 }
+
+/**
+ * soup_cookie_jar_delete_cookie:
+ * @jar: a #SoupCookieJar
+ * @cookie: a #SoupCookie
+ *
+ * Deletes @cookie from @jar, emitting the 'changed' signal.
+ **/
+void
+soup_cookie_jar_delete_cookie (SoupCookieJar *jar,
+			       SoupCookie    *cookie)
+{
+	SoupCookieJarPrivate *priv;
+	GSList *cookies, *p;
+	char *domain;
+
+	g_return_if_fail (SOUP_IS_COOKIE_JAR (jar));
+	g_return_if_fail (cookie != NULL);
+
+	priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar);
+
+	domain = g_strdup (cookie->domain);
+
+	cookies = g_hash_table_lookup (priv->domains, domain);
+	if (cookies == NULL)
+		return;
+
+	for (p = cookies; p; p = p->next ) {
+		SoupCookie *c = (SoupCookie*)p->data;
+		if (soup_cookie_equal (cookie, c)) {
+			g_signal_emit (jar, signals[CHANGED], 0,
+				       c, NULL);
+			cookies = g_slist_delete_link (cookies, p);
+			soup_cookie_free (c);
+			g_hash_table_insert (priv->domains,
+					     domain,
+					     cookies);
+			return;
+		}
+	}
+}
diff --git a/libsoup/soup-cookie-jar.h b/libsoup/soup-cookie-jar.h
index ef05c9c..28af619 100644
--- a/libsoup/soup-cookie-jar.h
+++ b/libsoup/soup-cookie-jar.h
@@ -38,18 +38,20 @@ typedef struct {
 	void (*_libsoup_reserved3) (void);
 } SoupCookieJarClass;
 
-GType          soup_cookie_jar_get_type    (void);
-SoupCookieJar *soup_cookie_jar_new         (void);
-void           soup_cookie_jar_save        (SoupCookieJar *jar);
-char          *soup_cookie_jar_get_cookies (SoupCookieJar *jar,
-					    SoupURI       *uri,
-					    gboolean       for_http);
-void           soup_cookie_jar_set_cookie  (SoupCookieJar *jar,
-					    SoupURI       *uri,
-					    const char    *cookie);
-void           soup_cookie_jar_add_cookie  (SoupCookieJar *jar,
-					    SoupCookie    *cookie);
-GSList        *soup_cookie_jar_all_cookies (SoupCookieJar *jar);
+GType          soup_cookie_jar_get_type      (void);
+SoupCookieJar *soup_cookie_jar_new           (void);
+void           soup_cookie_jar_save          (SoupCookieJar *jar);
+char          *soup_cookie_jar_get_cookies   (SoupCookieJar *jar,
+					      SoupURI       *uri,
+					      gboolean       for_http);
+void           soup_cookie_jar_set_cookie    (SoupCookieJar *jar,
+					      SoupURI       *uri,
+					      const char    *cookie);
+void           soup_cookie_jar_add_cookie    (SoupCookieJar *jar,
+					      SoupCookie    *cookie);
+void           soup_cookie_jar_delete_cookie (SoupCookieJar *jar,
+					      SoupCookie    *cookie);
+GSList        *soup_cookie_jar_all_cookies   (SoupCookieJar *jar);
 
 G_END_DECLS
 
