evolution-data-server r9972 - trunk/camel



Author: abharath
Date: Tue Jan 27 11:12:46 2009
New Revision: 9972
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9972&view=rev

Log:
2009-01-27  Simon Brys  <sbrys novell com>
 
       ** Fix for bug #464878 (BNC)

       * camel-http-stream.c (stream_read),
       (camel_http_stream_get_content_type): http_get_statuscode () should 
       get us the status code and handle redirects better.

       Bug Report:
       When an HTML attachment contains an image tag with a source that 
       returns a "HTTP/302 Moved Temporarily", that image is not displayed


Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-http-stream.c

Modified: trunk/camel/camel-http-stream.c
==============================================================================
--- trunk/camel/camel-http-stream.c	(original)
+++ trunk/camel/camel-http-stream.c	Tue Jan 27 11:12:46 2009
@@ -481,6 +481,9 @@
 		}
 	}
 	
+	if (n == 0)
+		return 0;
+	
 	nread = camel_mime_parser_read (http->parser, &parser_buf, n);
 	
 	if (nread > 0)
@@ -540,13 +543,7 @@
 	g_return_val_if_fail (CAMEL_IS_HTTP_STREAM (http_stream), NULL);
 
 	if (!http_stream->content_type && !http_stream->raw) {
-		if (http_connect (http_stream, http_stream->proxy ? http_stream->proxy : http_stream->url) == NULL)
-			return NULL;
-
-		if (http_method_invoke (http_stream) == -1)
-			return NULL;
-
-		if (http_get_headers (http_stream) == -1)
+		if (stream_read (CAMEL_STREAM (http_stream), NULL, 0) == -1)
 			return NULL;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]