Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
GStreamer
gst-plugins-good
Commits
cf31a428
Commit
cf31a428
authored
Feb 11, 2014
by
Sebastian Dröge
🍵
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
souphttpsrc: Add mapping for NOT_FOUND and NOT_AUTHORIZED errors
parent
5514bc27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
ext/soup/gstsouphttpsrc.c
ext/soup/gstsouphttpsrc.c
+20
-5
No files found.
ext/soup/gstsouphttpsrc.c
View file @
cf31a428
...
...
@@ -1184,11 +1184,26 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
/* FIXME: reason_phrase is not translated and not suitable for user
* error dialog according to libsoup documentation.
* FIXME: error code (OPEN_READ vs. READ) should depend on http status? */
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
"%s"
,
msg
->
reason_phrase
),
(
"%s (%d), URL: %s"
,
msg
->
reason_phrase
,
msg
->
status_code
,
src
->
location
));
*/
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
));
}
else
{
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
"%s"
,
msg
->
reason_phrase
),
(
"%s (%d), URL: %s"
,
msg
->
reason_phrase
,
msg
->
status_code
,
src
->
location
));
}
src
->
ret
=
GST_FLOW_ERROR
;
}
}
...
...
Bugzilla Migration User
@bugzilla-migration
mentioned in issue
#161
·
Nov 03, 2018
mentioned in issue
#161
mentioned in issue #161
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment