libsoup r1227 - in trunk: . libsoup
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libsoup r1227 - in trunk: . libsoup
- Date: Mon, 12 Jan 2009 22:21:50 +0000 (UTC)
Author: danw
Date: Mon Jan 12 22:21:50 2009
New Revision: 1227
URL: http://svn.gnome.org/viewvc/libsoup?rev=1227&view=rev
Log:
* libsoup/soup-cookie-jar.c (request_started): Don't pass NULL to
soup_message_headers_replace(), call soup_message_headers_remove()
if there are no cookies. Likely fix for webkit bug #23240.
* libsoup/soup-message-headers.c (soup_message_headers_append):
g_return_if_fail (value != NULL)
Modified:
trunk/ChangeLog
trunk/libsoup/soup-cookie-jar.c
trunk/libsoup/soup-message-headers.c
Modified: trunk/libsoup/soup-cookie-jar.c
==============================================================================
--- trunk/libsoup/soup-cookie-jar.c (original)
+++ trunk/libsoup/soup-cookie-jar.c Mon Jan 12 22:21:50 2009
@@ -430,9 +430,12 @@
char *cookies;
cookies = soup_cookie_jar_get_cookies (jar, soup_message_get_uri (msg), TRUE);
- soup_message_headers_replace (msg->request_headers,
- "Cookie", cookies);
- g_free (cookies);
+ if (cookies) {
+ soup_message_headers_replace (msg->request_headers,
+ "Cookie", cookies);
+ g_free (cookies);
+ } else
+ soup_message_headers_remove (msg->request_headers, "Cookie");
}
static void
Modified: trunk/libsoup/soup-message-headers.c
==============================================================================
--- trunk/libsoup/soup-message-headers.c (original)
+++ trunk/libsoup/soup-message-headers.c Mon Jan 12 22:21:50 2009
@@ -155,6 +155,9 @@
SoupHeader header;
SoupHeaderSetter setter;
+ g_return_if_fail (name != NULL);
+ g_return_if_fail (value != NULL);
+
header.name = intern_header_name (name, &setter);
header.value = g_strdup (value);
g_array_append_val (hdrs->array, header);
@@ -209,6 +212,8 @@
SoupHeaderSetter setter;
int index;
+ g_return_if_fail (name != NULL);
+
name = intern_header_name (name, &setter);
while ((index = find_header (hdr_array, name, 0)) != -1) {
g_free (hdr_array[index].value);
@@ -243,6 +248,8 @@
char *value;
int index, i;
+ g_return_val_if_fail (name != NULL, NULL);
+
name = intern_header_name (name, NULL);
if (hdrs->concat) {
value = g_hash_table_lookup (hdrs->concat, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]