From cdcb44468670b2f557070c43f2ca6dd389eda03c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 28 Sep 2019 18:00:43 +0300 Subject: Adapt to renaming butl::casecmp() to icasecmp() --- libbrep/utility.hxx | 4 ++-- mod/mod-ci.cxx | 4 ++-- mod/mod-submit.cxx | 4 ++-- mod/page.cxx | 4 ++-- web/apache/request.cxx | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libbrep/utility.hxx b/libbrep/utility.hxx index 233255a..96cf1d4 100644 --- a/libbrep/utility.hxx +++ b/libbrep/utility.hxx @@ -11,7 +11,7 @@ #include // assert() #include // make_move_iterator() -#include // casecmp(), reverse_iterate(), +#include // icasecmp(), reverse_iterate(), // operator<<(ostream, exception) namespace brep @@ -27,7 +27,7 @@ namespace brep // // - using butl::casecmp; + using butl::icasecmp; using butl::reverse_iterate; } diff --git a/mod/mod-ci.cxx b/mod/mod-ci.cxx index 168b57c..5a56526 100644 --- a/mod/mod-ci.cxx +++ b/mod/mod-ci.cxx @@ -398,9 +398,9 @@ handle (request& rq, response& rs) optional ua; for (const name_value& h: rq.headers ()) { - if (casecmp (h.name, ":Client-IP") == 0) + if (icasecmp (h.name, ":Client-IP") == 0) ip = h.value; - else if (casecmp (h.name, "User-Agent") == 0) + else if (icasecmp (h.name, "User-Agent") == 0) ua = h.value; } diff --git a/mod/mod-submit.cxx b/mod/mod-submit.cxx index 7666b55..3130823 100644 --- a/mod/mod-submit.cxx +++ b/mod/mod-submit.cxx @@ -427,9 +427,9 @@ handle (request& rq, response& rs) optional ua; for (const name_value& h: rq.headers ()) { - if (casecmp (h.name, ":Client-IP") == 0) + if (icasecmp (h.name, ":Client-IP") == 0) ip = h.value; - else if (casecmp (h.name, "User-Agent") == 0) + else if (icasecmp (h.name, "User-Agent") == 0) ua = h.value; } diff --git a/mod/page.cxx b/mod/page.cxx index 1061788..e34e568 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -573,8 +573,8 @@ namespace brep // Display HTTP(S) URL as link, striping the scheme prefix for the link // text. Display URL with a different scheme as plain text. // - if (casecmp (url_.scheme, "https") == 0 || - casecmp (url_.scheme, "http") == 0) + if (icasecmp (url_.scheme, "https") == 0 || + icasecmp (url_.scheme, "http") == 0) { butl::url u (url_); u.scheme.clear (); diff --git a/web/apache/request.cxx b/web/apache/request.cxx index ba5952e..bed7042 100644 --- a/web/apache/request.cxx +++ b/web/apache/request.cxx @@ -35,7 +35,7 @@ #include #include // min() -#include // casecmp() +#include // icasecmp() #include #include @@ -589,10 +589,10 @@ namespace web if (ct != nullptr) { - form_multipart_ = casecmp ("multipart/form-data", ct, 19) == 0; + form_multipart_ = icasecmp ("multipart/form-data", ct, 19) == 0; if (form_multipart_ || - casecmp ("application/x-www-form-urlencoded", ct, 33) == 0) + icasecmp ("application/x-www-form-urlencoded", ct, 33) == 0) *form_data_ = vector ( istreambuf_iterator (content (limit)), istreambuf_iterator ()); @@ -848,7 +848,7 @@ namespace web { assert (h->key != nullptr); - if (casecmp (h->key, "Cookie") == 0) + if (icasecmp (h->key, "Cookie") == 0) { for (const char* n (h->val); n != nullptr; ) { @@ -899,7 +899,7 @@ namespace web // Same content type. // - casecmp (type, rec_->content_type ? rec_->content_type : "") == 0) + icasecmp (type, rec_->content_type ? rec_->content_type : "") == 0) { // No change, return the existing stream. // -- cgit v1.1