souphttpsrc: always ignore HEAD errors

https://bugzilla.gnome.org/show_bug.cgi?id=704241
This commit is contained in:
Arnaud Vrac 2013-07-12 20:01:42 +02:00 committed by Sebastian Dröge
parent ef4a21253b
commit e67655608c

View file

@ -1116,11 +1116,11 @@ gst_soup_http_src_response_cb (SoupSession * session, SoupMessage * msg,
static void static void
gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
{ {
if (SOUP_STATUS_IS_TRANSPORT_ERROR (msg->status_code)) {
if (msg->method == SOUP_METHOD_HEAD) { if (msg->method == SOUP_METHOD_HEAD) {
if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code))
GST_DEBUG_OBJECT (src, "Ignoring error %d during HEAD request", GST_DEBUG_OBJECT (src, "Ignoring error %d during HEAD request",
msg->status_code); msg->status_code);
} else { } else if (SOUP_STATUS_IS_TRANSPORT_ERROR (msg->status_code)) {
switch (msg->status_code) { switch (msg->status_code) {
case SOUP_STATUS_CANT_RESOLVE: case SOUP_STATUS_CANT_RESOLVE:
case SOUP_STATUS_CANT_RESOLVE_PROXY: case SOUP_STATUS_CANT_RESOLVE_PROXY:
@ -1154,7 +1154,6 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
/* No error message when interrupted by program. */ /* No error message when interrupted by program. */
break; break;
} }
}
} else if (SOUP_STATUS_IS_CLIENT_ERROR (msg->status_code) || } else if (SOUP_STATUS_IS_CLIENT_ERROR (msg->status_code) ||
SOUP_STATUS_IS_REDIRECTION (msg->status_code) || SOUP_STATUS_IS_REDIRECTION (msg->status_code) ||
SOUP_STATUS_IS_SERVER_ERROR (msg->status_code)) { SOUP_STATUS_IS_SERVER_ERROR (msg->status_code)) {