http: Handle proxy authentication

Tested with both Basic and Digest authentication, and tested with
both proxy authentication and authentication for the requested
resource at the same time.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2011-11-11 11:21:42 +02:00
parent b01f5ba207
commit b911518d1c
2 changed files with 53 additions and 24 deletions

View File

@ -87,7 +87,7 @@ static void choose_qop(char *qop, int size)
void ff_http_auth_handle_header(HTTPAuthState *state, const char *key,
const char *value)
{
if (!strcmp(key, "WWW-Authenticate")) {
if (!strcmp(key, "WWW-Authenticate") || !strcmp(key, "Proxy-Authenticate")) {
const char *p;
if (av_stristart(value, "Basic ", &p) &&
state->auth_type <= HTTP_AUTH_BASIC) {