mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[curl] Ask for password for http
This commit is contained in:
parent
9389e2f903
commit
36b802251d
@ -400,12 +400,19 @@ http_curl_handle_error(struct connection *conn, CURLcode res)
|
|||||||
{
|
{
|
||||||
if (res == CURLE_OK) {
|
if (res == CURLE_OK) {
|
||||||
char *url = http_curl_check_redirect(conn);
|
char *url = http_curl_check_redirect(conn);
|
||||||
|
struct http_curl_connection_info *http = (struct http_curl_connection_info *)conn->info;
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
redirect_cache(conn->cached, url, 0, 0);
|
redirect_cache(conn->cached, url, 0, 0);
|
||||||
abort_connection(conn, connection_state(S_OK));
|
abort_connection(conn, connection_state(S_OK));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (http->code == 401L) {
|
||||||
|
add_auth_entry(conn->uri, "HTTP Auth", NULL, NULL, 0);
|
||||||
|
abort_connection(conn, connection_state(S_OK));
|
||||||
|
return;
|
||||||
|
}
|
||||||
abort_connection(conn, connection_state(S_OK));
|
abort_connection(conn, connection_state(S_OK));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user