* remove warning suppress not required anymore

* json update

* update the curl header including

* changelog
This commit is contained in:
Victor Vazquez 2021-07-27 18:09:52 -07:00 коммит произвёл GitHub
Родитель bd1beaf0b4
Коммит a508789c36
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 14 добавлений и 63 удалений

Просмотреть файл

@ -1,37 +0,0 @@
# Libcurl Transport Adapter
The Azure SDK for C++ provides an HTTP transport adapter implementation using the well known libcurl library. There are some general guidelines that you should know if you decide to use this implementation.
## Global init and clean up
Libcurl provides the functions [curl_global_init](https://curl.se/libcurl/c/curl_global_init.html) and [curl_global_cleanup](https://curl.se/libcurl/c/curl_global_cleanup.html) which are expected to be called at the start and before exiting the application. However, for a modular part of the application, like a library, it is expected that each library using libcurl will call the `curl_global_init` and `curl_global_cleanup`. From [libcurl global constants documentation](https://curl.se/libcurl/c/libcurl.html):
> Note that if multiple modules in the program use libcurl, they all will separately call the libcurl functions, and that's OK because only the first curl_global_init and the last curl_global_cleanup in a program change anything. (libcurl uses a reference count in static memory).
Consider the next example:
```cpp
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT
/**
* @file Demonstrate how to use libcurl and the Azure SDK for C++.
*
*/
#include <curl/curl.h>
#include <azure/storage/blob/blobs.hpp>
int main(int argc, char** argv)
{
curl_global_init(CURL_GLOBAL_ALL);
// Use the Azure SDK clients.
curl_global_cleanup();
return 0;
}
```
If the application is not using libcurl at all, only the Azure SDK library will call `curl_global_init` and `curl_global_cleanup`. If the application is calling the global functions and using libcurl, then the calls to these functions from the Azure SDK library won't change anything. So, as an application or library owner, you only need to worry about calling the global libcurl functions if you will be using libcurl directly.

Просмотреть файл

@ -11,6 +11,7 @@
### Bugs Fixed
- [2647](https://github.com/Azure/azure-sdk-for-cpp/issues/2647) Make the curl transport adapter to check the connection close header.
- [2474](https://github.com/Azure/azure-sdk-for-cpp/issues/2474) Fix compiling with MSVC and /analyze.
### Other Changes

Просмотреть файл

@ -152,12 +152,6 @@ if(BUILD_TRANSPORT_WINHTTP)
target_link_libraries(azure-core PRIVATE winhttp)
endif()
if (MSVC)
# Disable warnings:
# - C6101: Returning uninitialized memory '*Mtu' -> libcurl calling WSAGetIPUserMtu from WS2tcpip.h
target_compile_options(azure-core PUBLIC /wd6101)
endif()
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp")
generate_documentation(azure-core ${AZ_LIBRARY_VERSION})

Просмотреть файл

@ -2176,7 +2176,7 @@ _az_JSON_HEDLEY_DIAGNOSTIC_PUSH
class exception : public std::exception {
public:
/// returns the explanatory string
_az_JSON_HEDLEY_RETURNS_NON_NULL const char* what() const noexcept override
const char* what() const noexcept override
{
return m.what();
}

Просмотреть файл

@ -27,7 +27,6 @@
#endif
#include <algorithm>
#include <curl/curl.h>
#include <string>
#include <thread>

Просмотреть файл

@ -17,7 +17,6 @@
#include <atomic>
#include <azure/core/http/curl_transport.hpp>
#include <condition_variable>
#include <curl/curl.h>
#include <list>
#include <map>
#include <memory>

Просмотреть файл

@ -12,9 +12,20 @@
#include "azure/core/http/http.hpp"
#include <chrono>
#include <curl/curl.h>
#include <string>
#if defined(_MSC_VER)
// C6101 : Returning uninitialized memory '*Mtu'->libcurl calling WSAGetIPUserMtu from WS2tcpip.h
#pragma warning(push)
#pragma warning(disable : 6101)
#endif
#include <curl/curl.h>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
namespace Azure { namespace Core { namespace Http {
namespace _detail {

Просмотреть файл

@ -5,7 +5,6 @@
#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER)
#include <azure/core/platform.hpp>
#include <curl/curl.h>
#include <signal.h>
#endif

Просмотреть файл

@ -16,8 +16,6 @@
#include <gtest/gtest.h>
#include <curl/curl.h>
#include <azure/core/context.hpp>
#include <azure/core/http/curl_transport.hpp>
#include <azure/core/http/http.hpp>

Просмотреть файл

@ -19,7 +19,6 @@
#endif // _MSC_VER
#include <azure/core/http/curl_transport.hpp>
#include <curl/curl.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <string>

Просмотреть файл

@ -13,8 +13,6 @@
#include <azure/core/http/curl_transport.hpp>
#include <curl/curl.h>
namespace Azure { namespace Perf { namespace Test {
/**
* @brief A performance test that defines a test option.

Просмотреть файл

@ -3,12 +3,6 @@
#include <gtest/gtest.h>
#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER)
#include <azure/core/platform.hpp>
#include <curl/curl.h>
#include <signal.h>
#endif
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);

Просмотреть файл

@ -3,10 +3,6 @@
#include "gtest/gtest.h"
#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER)
#include <curl/curl.h>
#endif
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);