From 801ca0c2d3f3405ccb9b55e6ebffea935c33b1f8 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 13 May 2014 03:57:16 -0700 Subject: [PATCH] Compare idiomatically --- src/curl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/curl.cpp b/src/curl.cpp index ab187e2..41afca0 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -659,7 +659,7 @@ size_t S3fsCurl::HeaderCallback(void* data, size_t blockSize, size_t numBlocks, // Force to lower, only "x-amz" string lkey = key; transform(lkey.begin(), lkey.end(), lkey.begin(), static_cast(std::tolower)); - if(lkey.substr(0, 5) == "x-amz"){ + if(lkey.compare(0, 5, "x-amz") == 0){ key = lkey; } string value;