|  | @@ -104,6 +104,7 @@ static struct http_www_authenticate_field http_www_auth_fields[] = {
 | 
		
	
		
			
			| 104 | 104 |  static int http_parse_www_authenticate ( struct http_transaction *http,
 | 
		
	
		
			
			| 105 | 105 |  					 char *line ) {
 | 
		
	
		
			
			| 106 | 106 |  	struct http_www_authenticate_field *field;
 | 
		
	
		
			
			|  | 107 | +	struct http_authentication *auth;
 | 
		
	
		
			
			| 107 | 108 |  	char *name;
 | 
		
	
		
			
			| 108 | 109 |  	char *key;
 | 
		
	
		
			
			| 109 | 110 |  	char *value;
 | 
		
	
	
		
			
			|  | @@ -118,13 +119,19 @@ static int http_parse_www_authenticate ( struct http_transaction *http,
 | 
		
	
		
			
			| 118 | 119 |  	}
 | 
		
	
		
			
			| 119 | 120 |  
 | 
		
	
		
			
			| 120 | 121 |  	/* Identify scheme */
 | 
		
	
		
			
			| 121 |  | -	http->response.auth.auth = http_authentication ( name );
 | 
		
	
		
			
			| 122 |  | -	if ( ! http->response.auth.auth ) {
 | 
		
	
		
			
			|  | 122 | +	auth = http_authentication ( name );
 | 
		
	
		
			
			|  | 123 | +	if ( ! auth ) {
 | 
		
	
		
			
			| 123 | 124 |  		DBGC ( http, "HTTP %p unrecognised authentication scheme "
 | 
		
	
		
			
			| 124 | 125 |  		       "\"%s\"\n", http, name );
 | 
		
	
		
			
			| 125 |  | -		return -ENOTSUP;
 | 
		
	
		
			
			|  | 126 | +		/* Ignore; the server may offer other schemes */
 | 
		
	
		
			
			|  | 127 | +		return 0;
 | 
		
	
		
			
			| 126 | 128 |  	}
 | 
		
	
		
			
			| 127 | 129 |  
 | 
		
	
		
			
			|  | 130 | +	/* Use first supported scheme */
 | 
		
	
		
			
			|  | 131 | +	if ( http->response.auth.auth )
 | 
		
	
		
			
			|  | 132 | +		return 0;
 | 
		
	
		
			
			|  | 133 | +	http->response.auth.auth = auth;
 | 
		
	
		
			
			|  | 134 | +
 | 
		
	
		
			
			| 128 | 135 |  	/* Process fields */
 | 
		
	
		
			
			| 129 | 136 |  	while ( ( key = http_token ( &line, &value ) ) ) {
 | 
		
	
		
			
			| 130 | 137 |  		for ( i = 0 ; i < ( sizeof ( http_www_auth_fields ) /
 |