1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-20 00:15:31 +00:00

[curl] Once again disable FOLLOWLOCATION

The issue with curl is that it does not work with rememberred passwords.
This commit is contained in:
Witold Filipczyk 2024-04-09 20:27:30 +02:00
parent e183bc7bab
commit 5886cad776

View File

@ -195,7 +195,7 @@ do_http(struct connection *conn)
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, http->error);
curl_easy_setopt(curl, CURLOPT_PRIVATE, conn);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L);
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, offset);
@ -466,8 +466,13 @@ http_curl_handle_error(struct connection *conn, CURLcode res)
struct http_curl_connection_info *http = (struct http_curl_connection_info *)conn->info;
if (url) {
redirect_cache(conn->cached, url, (http->code == 303L), -1);
abort_connection(conn, connection_state(S_OK));
struct uri *uri = redirect_cache(conn->cached, url, (http->code == 303L), -1);
if (uri) {
set_connection_state(conn, connection_state(S_TRANS));
} else {
abort_connection(conn, connection_state(S_OK));
}
return;
}