mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
curlhttpsink: HTTP code in transfer error details
There is currently no easy way for an application to distinguish between different resource write errors being set in the curlhttpsink. Add HTTP status code as error details on transfer failure. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4062>
This commit is contained in:
parent
b41a5d3ccb
commit
8f094a1cc8
1 changed files with 3 additions and 2 deletions
|
@ -450,8 +450,9 @@ gst_curl_http_sink_transfer_verify_response_code (GstCurlBaseSink * bcsink)
|
|||
GST_DEBUG_OBJECT (sink, "response code: %ld", resp);
|
||||
|
||||
if (resp < 100 || resp >= 300) {
|
||||
bcsink->error = g_strdup_printf ("HTTP response error: (received: %ld)",
|
||||
resp);
|
||||
GST_ELEMENT_ERROR_WITH_DETAILS (sink, RESOURCE, WRITE,
|
||||
("HTTP response error code: %ld", resp), (NULL), ("http-status-code",
|
||||
G_TYPE_UINT, (guint) resp, NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue