[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 95/222: url: don't set appconnect time for non-ssl/non-ssh conne
From: |
gnunet |
Subject: |
[gnurl] 95/222: url: don't set appconnect time for non-ssl/non-ssh connections |
Date: |
Thu, 07 Nov 2019 00:09:51 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit cded9937007a1cad58dc66b62109b27d70b69b90
Author: Jay Satiro <address@hidden>
AuthorDate: Fri Apr 12 18:57:53 2019 -0400
url: don't set appconnect time for non-ssl/non-ssh connections
Prior to this change non-ssl/non-ssh connections that were reused set
TIMER_APPCONNECT [1]. Arguably that was incorrect since no SSL/SSH
handshake took place.
[1]: TIMER_APPCONNECT is publicly known as CURLINFO_APPCONNECT_TIME in
libcurl and %{time_appconnect} in the curl tool. It is documented as
"the time until the SSL/SSH handshake is completed".
Reported-by: Marcel Hernandez
Ref: https://github.com/curl/curl/issues/3760
Closes https://github.com/curl/curl/pull/3773
---
lib/url.c | 4 +++-
lib/urldata.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/url.c b/lib/url.c
index 14e6e2625..031f8f0c4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3815,7 +3815,9 @@ CURLcode Curl_setup_conn(struct connectdata *conn,
}
else {
Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
- Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
+ if(conn->ssl[FIRSTSOCKET].use ||
+ (conn->handler->protocol & PROTO_FAMILY_SSH))
+ Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
*protocol_done = TRUE;
Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
diff --git a/lib/urldata.h b/lib/urldata.h
index 310d93d18..2700bc2a6 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -68,6 +68,7 @@
#define PROTO_FAMILY_POP3 (CURLPROTO_POP3|CURLPROTO_POP3S)
#define PROTO_FAMILY_SMB (CURLPROTO_SMB|CURLPROTO_SMBS)
#define PROTO_FAMILY_SMTP (CURLPROTO_SMTP|CURLPROTO_SMTPS)
+#define PROTO_FAMILY_SSH (CURLPROTO_SCP|CURLPROTO_SFTP)
#define DEFAULT_CONNCACHE_SIZE 5
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 87/222: os400: getpeername() and getsockname() return ebcdic AF_UNIX sockaddr,, (continued)
- [gnurl] 87/222: os400: getpeername() and getsockname() return ebcdic AF_UNIX sockaddr,, gnunet, 2019/11/06
- [gnurl] 91/222: altsvc: correct the #ifdef for the ngtcp2 backend, gnunet, 2019/11/06
- [gnurl] 94/222: ngtcp2: remove fprintf() calls, gnunet, 2019/11/06
- [gnurl] 88/222: HTTP3.md: move -p for mkdir, remove -j for make, gnunet, 2019/11/06
- [gnurl] 108/222: FTP: url-decode path before evaluation, gnunet, 2019/11/06
- [gnurl] 89/222: urlapi: question mark within fragment is still fragment, gnunet, 2019/11/06
- [gnurl] 93/222: url: fix the NULL hostname compiler warning case, gnunet, 2019/11/06
- [gnurl] 97/222: openssl: use strerror on SSL_ERROR_SYSCALL, gnunet, 2019/11/06
- [gnurl] 109/222: FTP: add test for FTPFILE_NOCWD: Avoid redundant CWDs, gnunet, 2019/11/06
- [gnurl] 127/222: chunked-encoding: stop hiding the CURLE_BAD_CONTENT_ENCODING error, gnunet, 2019/11/06
- [gnurl] 95/222: url: don't set appconnect time for non-ssl/non-ssh connections,
gnunet <=
- [gnurl] 121/222: git: add tests/server/disabled to .gitignore, gnunet, 2019/11/06
- [gnurl] 122/222: AppVeyor: remove MSYS2_ARG_CONV_EXCL for winbuild, gnunet, 2019/11/06
- [gnurl] 125/222: urlapi: fix unused variable warning, gnunet, 2019/11/06
- [gnurl] 123/222: AppVeyor: add 32-bit MinGW-w64 build, gnunet, 2019/11/06
- [gnurl] 130/222: tool_operate: rename functions to make more sense, gnunet, 2019/11/06
- [gnurl] 129/222: curl: create easy handles on-demand and not ahead of time, gnunet, 2019/11/06
- [gnurl] 131/222: urlapi: fix URL encoding when setting a full URL, gnunet, 2019/11/06
- [gnurl] 114/222: docs: disambiguate CURLUPART_HOST is for host name (ie no port), gnunet, 2019/11/06
- [gnurl] 132/222: redirect: when following redirects to an absolute URL, URL encode it, gnunet, 2019/11/06
- [gnurl] 99/222: HTTP3: show an --alt-svc using example too, gnunet, 2019/11/06