73 DBGC ( http,
"HTTP %p malformed WWW-Authenticate \"%s\"\n",
81 DBGC ( http,
"HTTP %p unrecognised authentication scheme " 82 "\"%s\"\n", http,
name );
93 if ( (
rc = auth->
parse ( http, line ) ) != 0 ) {
94 DBGC ( http,
"HTTP %p could not parse %s WWW-Authenticate " 105 .
name =
"WWW-Authenticate",
118 char *buf,
size_t len ) {
130 auth_len = auth->
format ( http, ( buf + used ),
131 ( ( used <
len ) ? (
len - used ) : 0 ) );
132 if ( auth_len < 0 ) {
143 .
name =
"Authorization",
struct arbelprm_rc_send_wqe rc
int(* format)(struct http_transaction *http, char *buf, size_t len)
Construct remaining "Authorization" header line.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
An HTTP authentication scheme.
struct http_response_auth auth
Authorization descriptor.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct http_request request
Request.
struct http_response response
Response.
Hyper Text Transport Protocol.
struct http_request_auth auth
Authentication descriptor.
#define EPROTO
Protocol error.
struct http_request_header http_request_authorization __http_request_header
HTTP "Authorization" header.
char * strerror(int errno)
Retrieve string representation of error number.
struct http_authentication * auth
Authentication scheme (if any)
static int http_parse_www_authenticate(struct http_transaction *http, char *line)
Parse HTTP "WWW-Authenticate" header.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
char * http_token(char **line, char **value)
Get HTTP response token.
struct http_authentication * auth
Authentication scheme (if any)
const char * name
Name (e.g.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
struct http_response_header http_response_www_authenticate __http_response_header
HTTP "WWW-Authenticate" header.
int(* parse)(struct http_transaction *http, char *line)
Parse remaining "WWW-Authenticate" header line.
#define HTTP_AUTHENTICATIONS
HTTP authentication scheme table.
static int http_format_authorization(struct http_transaction *http, char *buf, size_t len)
Construct HTTP "Authorization" header.
#define NULL
NULL pointer (VOID *)
static struct http_authentication * http_authentication(const char *name)
Identify authentication scheme.