[Bug 678429] New: Soup HTTP Src plugin - gst_soup_http_src_create does not return GST_FLOW_ERROR in case of HTTP error 404 not found
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jun 19 17:38:06 PDT 2012
https://bugzilla.gnome.org/show_bug.cgi?id=678429
GStreamer | gst-plugins-good | 0.10.16
Summary: Soup HTTP Src plugin - gst_soup_http_src_create does
not return GST_FLOW_ERROR in case of HTTP error 404
not found
Classification: Platform
Product: GStreamer
Version: 0.10.16
OS/Version: Linux
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: nwaschbu at opentv.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
gst_soup_http_src_create does not return GST_FLOW_ERROR in case of HTTP error
404 not found.
What has been observed:
=======================
gst_soup_http_src_got_headers_cb calls gst_soup_http_src_parse_status.
gst_soup_http_src_parse_status detects an HTTP error and calls
GST_ELEMENT_ERROR. In addition, gst_soup_http_src_parse_status assigns
GST_FLOW_ERROR to src->ret (GstSoupHTTPSrc element instance structure). IMHO,
one of the subsequent calls to gst_soup_http_src_chunk_allocator appears to
occur unexpected. The reason for saying is that the GST_FLOW_ERROR of src->ret
gets overwritten by a GST_FLOW_OK. During the execution of
gst_soup_http_src_chunk_allocator, gst_pad_alloc_buffer gets called and its
return value gets assigned to src->ret. As a consequence, the subsequent
gst_soup_http_src_create returns a GST_FLOW_OK instead of GST_FLOW_ERROR as
expected. All this causes a buffer being allocated, filled with data of an
HTML body, and pushed out over the source pad of the Soup HTTP src. Not sure
whether this is intended behavior.
Experiment:
===========
The following experiment was run in an attempt to avoid that the error value of
src->ret gets overwritten.
static void
gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
{
...
/* Handle HTTP errors. */
gst_soup_http_src_parse_status (msg, src);
/* Check if Range header was respected. */
if (src->ret == GST_FLOW_CUSTOM_ERROR &&
src->read_position && msg->status_code != SOUP_STATUS_PARTIAL_CONTENT) {
...
src->ret = GST_FLOW_ERROR;
}
/* START OF EXPERIMENTAL CODE */
if ( src->ret == GST_FLOW_ERROR )
{
gst_soup_http_src_session_pause_message( src );
if (src->loop)
{
g_main_loop_quit (src->loop);
}
}
/* END OF EXPERIMENTAL CODE */
}
How to reproduce:
=================
Make sure that directory/filename part of the URI passed to Soup HTTP Src does
not match with any of the files located on the HTTP 1.1 test server. This will
cause a HTTP error response 404 from the server.
HTTP 1.1 Server:
================
Apache/2.2.15 (Fedora)
Gstreamer version:
==================
gst-plugins-good-0.10.16
Please be so kind on comment on my problem seen. It would be much appreciated.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list