summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout@mind.be>2009-07-16 15:14:43 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-07-16 17:14:15 +0200
commit07c454d61ec014334812517e24aa694552dbe03d (patch)
treef1c24101b3a9cc58ba845132d790934dce2f37bb /ext
parentc5b420068a069c83b735d57f78e427bcc0a5fef4 (diff)
souphttpsrc: don't try to authenticate if no username/password is set.
Diffstat (limited to 'ext')
-rw-r--r--ext/soup/gstsouphttpsrc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index 812cd78d..1a94576f 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -703,9 +703,11 @@ gst_soup_http_src_authenticate_cb (SoupSession * session, SoupMessage * msg,
if (!retrying) {
/* First time authentication only, if we fail and are called again with retry true fall through */
if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) {
- soup_auth_authenticate (auth, src->user_id, src->user_pw);
+ if (src->user_id && src->user_pw)
+ soup_auth_authenticate (auth, src->user_id, src->user_pw);
} else if (msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) {
- soup_auth_authenticate (auth, src->proxy_id, src->proxy_pw);
+ if (src->proxy_id && src->proxy_pw)
+ soup_auth_authenticate (auth, src->proxy_id, src->proxy_pw);
}
}
}