Index: libsoup/soup-date.c
===================================================================
--- libsoup/soup-date.c	(revision 1277)
+++ libsoup/soup-date.c	(working copy)
@@ -375,7 +375,7 @@ parse_textual_date (SoupDate *date, cons
  * "Sun, 06 Nov 1994 08:49:37 GMT"
  * @SOUP_DATE_COOKIE: The format for the "Expires" timestamp in the
  * Netscape cookie specification. Eg, "Sun, 06-Nov-1994 08:49:37 GMT".
- * @SOUP_DATE_RFC2822: RFC 2822 format, eg "Sun, 6 Nov 1994 09:49:37 -0100"
+ * @SOUP_DATE_RFC2822: RFC 2822 format, eg "Sun, 06 Nov 1994 09:49:37 -0100"
  * @SOUP_DATE_ISO8601_COMPACT: ISO 8601 date/time with no optional
  * punctuation. Eg, "19941106T094937-0100".
  * @SOUP_DATE_ISO8601_FULL: ISO 8601 date/time with all optional
@@ -526,7 +526,18 @@ soup_date_to_string (SoupDate *date, Sou
 		return g_strdup_printf ("%04d%02d%02dT%02d:%02d:%02d",
 					date->year, date->month, date->day,
 					date->hour, date->minute, date->second);
-
+	case SOUP_DATE_RFC2822:
+	{
+		gint hour_offset = date->offset / 60;
+		/* "Sun, 06 Nov 1994 09:49:37 -0100" */
+		return g_strdup_printf ("%s, %02d %s %04d %02d:%02d:%02d %c%02d%02d",
+					soup_date_weekday (date), date->day,
+					months[date->month - 1],
+					date->year, date->hour, date->minute,
+					date->second, (date->offset < 0) ? '-' : '+',
+					hour_offset, date->offset - (hour_offset * 60)
+					);
+	}
 	default:
 		return NULL;
 	}
