[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 84/220: curl: use CURLINFO_PROTOCOL to check for HT
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 84/220: curl: use CURLINFO_PROTOCOL to check for HTTP(s) |
Date: |
Thu, 12 Sep 2019 17:27:24 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit d39ae9d493f5e3abc1241d6e7ff89a885be1387a
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Aug 6 11:49:03 2019 +0200
curl: use CURLINFO_PROTOCOL to check for HTTP(s)
... instead of CURLINFO_EFFECTIVE_URL to avoid string operations.
---
src/tool_operate.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 8d526c328..923b5a99d 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -453,10 +453,9 @@ static CURLcode post_transfer(struct GlobalConfig *global,
/* If it returned OK. _or_ failonerror was enabled and it
returned due to such an error, check for HTTP transient
errors to retry on. */
- char *effective_url = NULL;
- curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
- if(effective_url &&
- checkprefix("http", effective_url)) {
+ long protocol;
+ curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
+ if((protocol == CURLPROTO_HTTP) || (protocol == CURLPROTO_HTTPS)) {
/* This was HTTP(S) */
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] 110/220: curl_version_info: offer quic (and h3) library info, (continued)
- [GNUnet-SVN] [gnurl] 110/220: curl_version_info: offer quic (and h3) library info, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 122/220: CURLOPT_ALTSVC.3: use a "" file name to not load from a file, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 113/220: docs/HTTP3: simplify quiche build instruction, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 116/220: curl_version_info.3: mentioned ALTSVC and HTTP3, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 121/220: vauth: Use CURLE_AUTH_ERROR for auth function errors, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 125/220: quiche: happy eyeballs, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 119/220: examples: add http3.c, altsvc.c and http3-present.c, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 127/220: multi: getsock improvements for QUIC connecting, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 86/220: docs/EXPERIMENTAL: explain what it means and what's experimental now, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 73/220: tests: Fix the line endings for the SASL alt-auth tests, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 84/220: curl: use CURLINFO_PROTOCOL to check for HTTP(s),
gnunet <=
- [GNUnet-SVN] [gnurl] 72/220: examples: Added SASL PLAIN authorisation identity (authzid) examples, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 90/220: http3: fix the HTTP/3 in the request, make alt-svc set right versions, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 88/220: CURLOPT_HTTP_VERSION: seting this to 3 forces HTTP/3 use directly, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 104/220: nghttp3: required when ngtcp2 is used for QUIC, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 106/220: ngtcp2: send HTTP/3 request with nghttp3, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 107/220: CURLOPT_READFUNCTION.3: provide inline example, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 111/220: ngtcp2: initial h3 request work, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 128/220: ngtcp2: don't reinitialize SSL on Retry, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 124/220: ngtcp2: do QUIC connections happy-eyeballs friendly, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 135/220: tests: Replace outdated test case numbering documentation, gnunet, 2019/09/12