diff options
author | Simon Brys <sbrys@novell.com> | 2009-01-27 11:14:16 +0000 |
---|---|---|
committer | Bharath Acharya <abharath@src.gnome.org> | 2009-01-27 11:14:16 +0000 |
commit | 5246991fa3c48b4b10b9fbbc6613f33142416b10 (patch) | |
tree | 49a3f3ebc1de3d232320e4a32743244b5ed62d4c | |
parent | c9a0dadfc0858e2b559ba63aaabe1423ece1f4e6 (diff) | |
download | evolution-data-server-5246991fa3c48b4b10b9fbbc6613f33142416b10.tar.gz |
** Fix for bug #464878 (BNC)
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
svn path=/branches/gnome-2-24/; revision=9973
-rw-r--r-- | camel/ChangeLog | 12 | ||||
-rw-r--r-- | camel/camel-http-stream.c | 11 |
2 files changed, 16 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index d79187522..419ebb81d 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,17 @@ 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 + +2009-01-27 Simon Brys <sbrys@novell.com> + ** Fix for bug #467075 (BNC) * camel-url-scanner.c (camel_url_web_end): Exclude the closing bracket diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c index c755354df..0261b6665 100644 --- a/camel/camel-http-stream.c +++ b/camel/camel-http-stream.c @@ -481,6 +481,9 @@ stream_read (CamelStream *stream, char *buffer, size_t n) } } + if (n == 0) + return 0; + nread = camel_mime_parser_read (http->parser, &parser_buf, n); if (nread > 0) @@ -540,13 +543,7 @@ camel_http_stream_get_content_type (CamelHttpStream *http_stream) 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; } |