summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/soup/gstsouphttpsrc.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index 11842f175..35fa2de05 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -1203,7 +1203,8 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
src->seekable = FALSE;
GST_ELEMENT_ERROR (src, RESOURCE, SEEK,
(_("Server does not support seeking.")),
- ("Server does not accept Range HTTP header, URL: %s", src->location));
+ ("Server does not accept Range HTTP header, URL: %s, Redirect to: %s",
+ src->location, GST_STR_NULL (src->redirection_uri)));
src->ret = GST_FLOW_ERROR;
}
@@ -1461,8 +1462,8 @@ gst_soup_http_src_response_cb (SoupSession * session, SoupMessage * msg,
#define SOUP_HTTP_SRC_ERROR(src,soup_msg,cat,code,error_message) \
GST_ELEMENT_ERROR ((src), cat, code, ("%s", error_message), \
- ("%s (%d), URL: %s", (soup_msg)->reason_phrase, \
- (soup_msg)->status_code, (src)->location));
+ ("%s (%d), URL: %s, Redirect to: %s", (soup_msg)->reason_phrase, \
+ (soup_msg)->status_code, (src)->location, GST_STR_NULL ((src)->redirection_uri)));
static void
gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
@@ -1533,21 +1534,23 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
if (msg->status_code == SOUP_STATUS_NOT_FOUND) {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
("%s", msg->reason_phrase),
- ("%s (%d), URL: %s", msg->reason_phrase, msg->status_code,
- src->location));
- } else if (msg->status_code == SOUP_STATUS_UNAUTHORIZED ||
- msg->status_code == SOUP_STATUS_PAYMENT_REQUIRED ||
- msg->status_code == SOUP_STATUS_FORBIDDEN ||
- msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) {
- GST_ELEMENT_ERROR (src, RESOURCE, NOT_AUTHORIZED,
- ("%s", msg->reason_phrase),
- ("%s (%d), URL: %s", msg->reason_phrase, msg->status_code,
- src->location));
+ ("%s (%d), URL: %s, Redirect to: %s", msg->reason_phrase,
+ msg->status_code, src->location,
+ GST_STR_NULL (src->redirection_uri)));
+ } else if (msg->status_code == SOUP_STATUS_UNAUTHORIZED
+ || msg->status_code == SOUP_STATUS_PAYMENT_REQUIRED
+ || msg->status_code == SOUP_STATUS_FORBIDDEN
+ || msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) {
+ GST_ELEMENT_ERROR (src, RESOURCE, NOT_AUTHORIZED, ("%s",
+ msg->reason_phrase), ("%s (%d), URL: %s, Redirect to: %s",
+ msg->reason_phrase, msg->status_code, src->location,
+ GST_STR_NULL (src->redirection_uri)));
} else {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
("%s", msg->reason_phrase),
- ("%s (%d), URL: %s", msg->reason_phrase, msg->status_code,
- src->location));
+ ("%s (%d), URL: %s, Redirect to: %s", msg->reason_phrase,
+ msg->status_code, src->location,
+ GST_STR_NULL (src->redirection_uri)));
}
src->ret = GST_FLOW_ERROR;
}