Skip to content

Commit f7c0940

Browse files
bk2204ttaylorr
authored andcommitted
git-curl-compat: remove check for curl 7.25.0
libcurl 7.25.0 was released in March 2012, which is well over ten years ago, and no major operating system vendor is still providing security support for it. Debian 8, RHEL 7, and Ubuntu 12.10, all of which are out of mainstream security support, have all supported a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 8bf7f9e commit f7c0940

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

git-curl-compat.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
* introduced, oldest first, in the official version of cURL library.
2929
*/
3030

31-
/**
32-
* CURLOPT_TCP_KEEPALIVE was added in 7.25.0, released in March 2012.
33-
*/
34-
#if LIBCURL_VERSION_NUM >= 0x071900
35-
#define GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE 1
36-
#endif
37-
38-
3931
/**
4032
* CURLOPT_LOGIN_OPTIONS was added in 7.34.0, released in December
4133
* 2013.

http.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -716,35 +716,11 @@ static int has_proxy_cert_password(void)
716716
}
717717
#endif
718718

719-
#ifdef GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE
720719
static void set_curl_keepalive(CURL *c)
721720
{
722721
curl_easy_setopt(c, CURLOPT_TCP_KEEPALIVE, 1);
723722
}
724723

725-
#else
726-
static int sockopt_callback(void *client, curl_socket_t fd, curlsocktype type)
727-
{
728-
int ka = 1;
729-
int rc;
730-
socklen_t len = (socklen_t)sizeof(ka);
731-
732-
if (type != CURLSOCKTYPE_IPCXN)
733-
return 0;
734-
735-
rc = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&ka, len);
736-
if (rc < 0)
737-
warning_errno("unable to set SO_KEEPALIVE on socket");
738-
739-
return CURL_SOCKOPT_OK;
740-
}
741-
742-
static void set_curl_keepalive(CURL *c)
743-
{
744-
curl_easy_setopt(c, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
745-
}
746-
#endif
747-
748724
/* Return 1 if redactions have been made, 0 otherwise. */
749725
static int redact_sensitive_header(struct strbuf *header, size_t offset)
750726
{

0 commit comments

Comments
 (0)