From 8f14a22e5bbb71d90577b35a09ba8ffae04bfe9c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 28 Sep 2019 17:58:00 +0300 Subject: Rename casecmp() function and case_compare_[c_]string structs to icasecmp() and icase_compare_[c_]string --- libbutl/curl.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libbutl/curl.cxx') diff --git a/libbutl/curl.cxx b/libbutl/curl.cxx index f88869b..33ca5be 100644 --- a/libbutl/curl.cxx +++ b/libbutl/curl.cxx @@ -33,7 +33,7 @@ import butl.fdstream; import butl.small_vector; #endif -import butl.utility; // casecmp() +import butl.utility; // icasecmp() #else #include #endif @@ -178,8 +178,7 @@ namespace butl if (n == string::npos) throw invalid_argument ("no protocol in URL"); - if (casecmp (u, "ftp", n) == 0 || - casecmp (u, "tftp", n) == 0) + if (icasecmp (u, "ftp", n) == 0 || icasecmp (u, "tftp", n) == 0) { switch (m) { @@ -189,8 +188,7 @@ namespace butl throw invalid_argument ("POST method with FTP protocol"); } } - else if (casecmp (u, "http", n) == 0 || - casecmp (u, "https", n) == 0) + else if (icasecmp (u, "http", n) == 0 || icasecmp (u, "https", n) == 0) { o.push_back ("--fail"); // Fail on HTTP errors (e.g., 404). o.push_back ("--location"); // Follow redirects. -- cgit v1.1