File bnc-464878-camel-http-stream.patch of Package evolution-data-server
--- camel/camel-http-stream.c.orig 2009-01-09 15:51:52.000000000 +0100
+++ camel/camel-http-stream.c 2009-01-09 16:05:35.000000000 +0100
@@ -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;
}