Fixed headers parsing in CurlHttpClient

1. substr(pos, pos_end) was used instead of substr(pos, pos_end - pos)
2. CURLOPT_HEADERFUNCTION is called for single header so no need to
   merge and split them later

Change-Id: Iad852212258f870c2fe0683b0021ae99a020d12b
Reviewed-on: https://weave-review.googlesource.com/1562
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/src/device_registration_info_unittest.cc b/src/device_registration_info_unittest.cc
index 9edd396..8174b90 100644
--- a/src/device_registration_info_unittest.cc
+++ b/src/device_registration_info_unittest.cc
@@ -222,10 +222,9 @@
   url += "client_id=";
   url += test_data::kClientId;
   EXPECT_EQ(url, dev_reg_->GetOAuthURL(
-                     "auth",
-                     {{"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"},
-                      {"response_type", "code"},
-                      {"client_id", test_data::kClientId}}));
+                     "auth", {{"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"},
+                              {"response_type", "code"},
+                              {"client_id", test_data::kClientId}}));
 }
 
 TEST_F(DeviceRegistrationInfoTest, HaveRegistrationCredentials) {