diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-05-25 02:54:46 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-05-25 02:54:46 +0100 |
commit | 253833045491a69f36bce52af119a880c7ccdfb5 (patch) | |
tree | 6318d0c47f97eebe427e8cca9cafef4bfe0befba /src | |
parent | fa3f6956427d992bc83ac6ea80d1f0ae9834facf (diff) | |
download | xine-lib-253833045491a69f36bce52af119a880c7ccdfb5.tar.gz xine-lib-253833045491a69f36bce52af119a880c7ccdfb5.tar.bz2 |
Add a message code to distinguish between HTTP response codes 401 and 403.
This should allow for front ends to do things such as prompt for authentication.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_http.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/input/input_http.c b/src/input/input_http.c index 6e8932700..b3e5a033b 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -829,7 +829,13 @@ static int http_plugin_open (input_plugin_t *this_gen ) { _("input_http: http status not 2xx: >%d %s<\n"), httpcode, httpstatus); return -7; - } else if (httpcode == 403 || httpcode == 401) { + } else if (httpcode == 401) { + _x_message(this->stream, XINE_MSG_AUTHENTICATION_NEEDED, this->mrl, NULL); + xine_log (this->stream->xine, XINE_LOG_MSG, + _("input_http: http status not 2xx: >%d %s<\n"), + httpcode, httpstatus); + return -8; + } else if (httpcode == 403) { _x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, NULL); xine_log (this->stream->xine, XINE_LOG_MSG, _("input_http: http status not 2xx: >%d %s<\n"), |