From 0e159e3b035e5d5b7fd1fc37adb7d0f6f8d20793 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Thu, 2 Jan 2014 20:23:05 -0300 Subject: [PATCH] souphttpsrc: use status code macro instead of 407 Rest of the code is using the _PROXY_AUTHENTICATION_REQUIRED macro too. Easier to understand if you don't recall HTTP error codes by heart. --- ext/soup/gstsouphttpsrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 80f9eb0329..bf10adee6e 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -745,7 +745,8 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src) soup_message_headers_foreach (msg->response_headers, gst_soup_http_src_headers_foreach, src); - if (msg->status_code == 407 && src->proxy_id && src->proxy_pw) + if (msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED && + src->proxy_id && src->proxy_pw) return; if (src->automatic_redirect && SOUP_STATUS_IS_REDIRECTION (msg->status_code)) {