diff options
| author | Milan Crha <mcrha@redhat.com> | 2007-11-22 07:13:28 +0000 |
|---|---|---|
| committer | Milan Crha <mcrha@src.gnome.org> | 2007-11-22 07:13:28 +0000 |
| commit | cea3163abf4917f344b45186b590ad5ddb094ef2 (patch) | |
| tree | f8e5f6e3cde20d1e143b215fe2ce1c47f4b706db | |
| parent | 34b7a7c6c834742733f9f77868d5df613c1ca510 (diff) | |
| download | evolution-data-server-cea3163abf4917f344b45186b590ad5ddb094ef2.tar.gz | |
** Fix for bug #376425
2007-11-22 Milan Crha <mcrha@redhat.com>
** Fix for bug #376425
* camel-http-stream.c: (camel_http_stream_get_content_type):
Use proxy if user uses it.
* camel-http-stream.c: (camel_http_stream_set_proxy):
Do not crash if have proxy without name and password.
svn path=/branches/gnome-2-20/; revision=8230
| -rw-r--r-- | camel/ChangeLog | 9 | ||||
| -rw-r--r-- | camel/camel-http-stream.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 4ea359b16..dc7bde755 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2007-11-22 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #376425 + + * camel-http-stream.c: (camel_http_stream_get_content_type): + Use proxy if user uses it. + * camel-http-stream.c: (camel_http_stream_set_proxy): + Do not crash if have proxy without name and password. + 2007-11-11 Matthew Barnes <mbarnes@redhat.com> * camel-tcp-stream-ssl.c (enable_ssl): diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c index 5cd7c9763..aff9e46e1 100644 --- a/camel/camel-http-stream.c +++ b/camel/camel-http-stream.c @@ -540,7 +540,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->url) == NULL) + if (http_connect (http_stream, http_stream->proxy ? http_stream->proxy : http_stream->url) == NULL) return NULL; if (http_method_invoke (http_stream) == -1) @@ -578,7 +578,7 @@ camel_http_stream_set_proxy (CamelHttpStream *http_stream, const char *proxy_url else http_stream->proxy = camel_url_new (proxy_url, NULL); - if (http_stream->proxy) { + if (http_stream->proxy && ((http_stream->proxy->user && *http_stream->proxy->user) || (http_stream->proxy->passwd && *http_stream->proxy->passwd))) { char *basic, *basic64; basic = g_strdup_printf("%s:%s", http_stream->proxy->user?http_stream->proxy->user:"", |
