* Add back-ticks around `Response<void>` in changelog
* Remove extra whitespace after type name in identity CL.
* Add back-ticks around type name in identity CL.
Co-authored-by: Victor Vazquez <victor.vazquez@microsoft.com>
* Move changelog entry to correct place
* Reformat breaking changes
* New feature in the right place
* body_stream.hpp
* Backtick
* Add changes made for Context
* More updates
* More updates
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
* Moved the `Base64Encode()` and `Base64Decode()` functions to be static members of a `Convert` class within the `Azure::Core` namespace.
* Add the class name in the source file for posix.
Usability studies found that static methods are generally not as user-friendly as instance methods. Folks new to the SDK have harder time discovering the APIs, they reverse the flow of typing, and the calling code ends up a bit more verbose because you have to spell out the whole namespace and type name when there aren't any using directives.
There doesn't seem to be a strong benefit or feasibility reason to keep these method statics which are typically harder to use and discover.
cc @kyle-patterson
Part of https://github.com/Azure/azure-sdk-for-cpp/issues/1789
> We shouldn't have Method, StatusCode, or Range. The way to reason about this is chances of collision and ease of documentation/discover-ability in SEO. RawResponse is specific enough that it doesn't need Http prefix, that's how I would draw the line.
Part of https://github.com/Azure/azure-sdk-for-cpp/issues/1789
From Jeff:
> BodyStream is only exposed to users when uploading/downloading bytes. Except for Storage almost no services do this at all; they read the stream and deserialize into a structure and the customer gets the structure - not the stream. Azure::Core:IO is a fine namespace.
* Make sure DateTime.ToString() works without requiring additional parameters by choosing RFC 3339 as the default.
* Address naming feedback and add some tests.
* Fix test warning by using static cast.
* VS2017 is right, we should be including `<iterator>`, if we use `std::inserter`. It fails to compile on VS2017 without that include.
Why if fails on 2017 and not 2019? Some of the other stdlib headers we include must be including `<iterator>` indirectly in 2019. But we should not be relying on that. Standard says, you use `std::inserter` - include `<iterator>`, if it works without that, that's a coincidence which may break beween versions of stdlib/compilers.
* VS 2017 does not fail because we don't include `<type_taits>` here, but formally we should include it too, because we use
`std::remove_reference` and `std::remove_const`. It just happens that `log.hpp` includes it, but we should not be relying on that.
This was found during local vcpkg verification - I happen to have it configured targeting VS2017. It does not mean it will fail in vcpkg CI, or would affect many customers, but some for sure. Verification on vcpkg CI looks good - https://github.com/microsoft/vcpkg/pull/16578 (it is based on our master as of Sat 3/6 + this fix).
I verified locally that it builds successfully on `x64-windows`, `x64-windows-static`, and `arm-uwp`.
We should run verification once again, once we have all the renames/moves in master.
* For consistency within the SDK, move Azure::Core::Context to be the last
parameter for various Azure::Core APIs.
* Fix merge conflict due to log policy file change.
* Update new client options tests
* Moved `BodyStream` and its derived types from `Azure::Core::Http`
namespace to `Azure::IO`, and update headers.
* Fix up clang formatting.
* Add missing winhttp bodystream namespace change.
* Update merge conflict related changes.
* Update header paths in includes.
* Add CaseInsensitiveMap<T>
* Drop unneccessary namespace qualification
* Comment working: more accurate description
* GCC and Clang fix (typename specification) + doxy comments for template parameters
* Remove Allocator template parameter - we can add it later if we need it, currently no need to commit to having it there
* Drop <T> template parameter. We can add it later with default value of std::string without breaking change
* Unit test
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
* Defend public headers against inclusion of Windows.h
... which defines some nasty function-like macros `min` and `max` when `_NOMINMAX` isn't defined. We prevent expansion as a function-like macro by inserting some token(s) between `min`/`max` and the following `(`. Most commonly that means wrapping the entire qualified-name in `()` a la `(std::min)(x, y)`, but an explicit template argument list (`std::min<int>(x, y)`) works as well.
* clang-format all the things
* Test coverage
I assume that the `azure-meow-common` headers are fully covered by the tests for the `azure-meow-woof` SDKs.
* Throw a runtime error when calling Rewind on unsupported BodyStreams and update the exception message.
* Add rewind test for bodystream.
* Change exception type from runtime to logic.
* Add necessary platform specific headers.
Partial work from #1342
Moving the Http Pipeline to the internal layer.
The HTTP pipeline is yet exposed through the Storage protocol layer headers which only use it from its Details namespace but still expose it. Fixing that would require re-doing its protocol layer, which is not ideal, so the expectation is to just leave it as Internal to be enough to be considered as non-for-end-users
* Address implementation level feedback for Md5Hash and delete ctors.
* Address docs feedback.
* Address PR feedback
* Move the copy ctor deletion from Md5Hash to the base class.
* Remove re-assignment of Crc64Hash in tests.
* Add MD5 hashing APIs to Azure::Core available from azure/core/md5.hpp.
* Add simplified header test for md5 and base64.
* Add changelog entry.
* Remove unnecessary include.
* Address feedback - add back ptr, length APIs.
* Address PR feedback - docs and typo fixes.
* Add a Hash base class and redesign Md5 to derive from it.
* Add test for call to final on empty instance.
* Remove old file which got renamed to hash.hpp.
* Remove md5.hpp file references.
* Address PR feedback - move to crypto, remove virtual, and misc.
* Add VcPkg OpenSSL dependency for Azure::Core
* OpenSSL is not required on UWP either
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
* release mode test for Linux with test
* Fix GCC warning when building in Release configuration
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
While parsing a chunked response with the curl HTTP transport adapter, there was an issue for parsing the last chunk.
As soon as the end of chunk data was found ("0") the adapter was returning and setting the session state as if the transfer was completed.
However, the HTTP RFC for chunked data (https://tools.ietf.org/html/rfc7230#section-4.1) defines that there is a CRLF after the last chunk info.
By not reading the last CRLF from the response, and if the connection was re-used right after reading the last chunk made the next request to get the `CRLF` as the first part for the response, making the parser crash.
The fix in this PR makes sure that when the last chunk is found and parsed, the CRLF is also parsed from the response to make sure that the response data transfer has completed
fixes: #1396
* Disable dependency on azure-core until azure-core releases to vcpkg.
* Remove release artifact creation script and pipeline step
* Copy items from root cmake generate outputs (no need to do individual project preparation)
* Space
* Add VcpkgPortName (package port names may change in the future to include non v1 version numbers like azure-template-cpp-v2)
* Destination should be artifact name, not vcpkg port name
* Disable PR steps
* SHA512 1 -> SHA512 %SHA512%
* New release procedure
* Unblock publishing process
* Increment azure-template version
* Update branch strategy, uncomment final release of template
* Increment version to test release
* Fix remote branch checkout logic
* Increment version
* Exit successfully
* Increment version
* Increment Version
* Version Increment
* Add a difference in the output file to validate multiple runs against a target PR branch
* Enable existing PR branches in create-pull-request.yml
* Increment version
* Fix archetype-cpp-release.yml syntax
* Skip checkout instead
* Increment version
* Fix automated version incrementing
* Increment version
* Update CHANGELOG.md
* Update CHANGELOG.md date
* Revert CONTROL file
* Remove Build-Depends
* Increment version
* Output commands
* Check out branch in either branch scenario
* Increment version
* Fetch the .tar.gz file using convention, the REST API does not give the location of the .tar.gz
* Increment Version
* ToLower
* Increment
* Increment version
* Version updater should not append a new line to the end of the file contents (existing new line at the end of the file will remain, if present)
* Add azure-template2 to validate base case of shipping different packages instead of file replacement validation from previous runs
* Remove extra backtick
* Add template2 to root CMakeLists.txt
* Review feedback: Support main scenario with packages coming from different location (no new file conflicts)
* Remove file blocking link check step. This is ok because the whole azure-template2 folder will be removed after this verification is complete
* Version increment
* Make template2 install in different locations
* Increment version
* Remove azure-template2 that was used for validating publishing multiple packages
* Remove template2 from ci.yml
* Use "SHA512 1" syntax as proposed by vcpkg documentation and regex replacement
* Review feedback
* Increment version
* Quotes
* Review feedback and re-add New-ReleaseAsset.ps1
# Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests).
- [x] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html)
- [x] Doxygen docs
- [x] Unit tests
- [x] No unwanted commits/changes
- [x] Descriptive title/description
- [x] PR is single purpose
- [x] Related issue listed
- [x] Comments in source
- [x] No typos
- [x] Update changelog
- [x] Not work-in-progress
- [x] External references or docs updated
- [x] Self review of PR done
- [x] Any breaking changes?
* Add Base64 encode and decode APIs to Azure::Core (from Azure::Storage).
* Revert changes to crypt.hpp to leave callsite updates for auto-gen
storage component for later.
* Add entry to changelog.
* Add basic unit tests.
* Remove definition of NOMINMAX since it is unnecessary.
* Include missing header from openssl.
* Include missing open ssl buffer header.
* Address feedback around angle brackets, and move implementation into a
namespace block.
* Remove redundant namespace qualifier in the signature.
* Link openssl to azure-core for non-Windows platforms, to fix the MacOS
linking issue.
# Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests).
- [ ] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html)
- [ ] Doxygen docs
- [ ] Unit tests
- [ ] No unwanted commits/changes
- [ ] Descriptive title/description
- [ ] PR is single purpose
- [ ] Related issue listed
- [ ] Comments in source
- [ ] No typos
- [ ] Update changelog
- [ ] Not work-in-progress
- [ ] External references or docs updated
- [ ] Self review of PR done
- [ ] Any breaking changes?
Moves package version strings in the details namespace.
Fixes#1249
# Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests).
- [x] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html)
- [x] Doxygen docs
- [x] Unit tests
- [x] No unwanted commits/changes
- [x] Descriptive title/description
- [x] PR is single purpose
- [x] Related issue listed
- [x] Comments in source
- [x] No typos
- [x] Update changelog
- [x] Not work-in-progress
- [x] External references or docs updated
- [x] Self review of PR done
- [x] Any breaking changes?
# Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests).
- [x] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html)
- [x] Doxygen docs
- [x] Unit tests
- [x] No unwanted commits/changes
- [x] Descriptive title/description
- [x] PR is single purpose
- [x] Related issue listed
- [x] Comments in source
- [x] No typos
- [x] Update changelog
- [x] Not work-in-progress
- [x] External references or docs updated
- [x] Self review of PR done
- [x] Any breaking changes?
* fix curl dependency on non-standard install prefix
When `libcurl` is installed to a non-standard install prefix `azure-core` will configure include/lib directories correctly (as long as `CMAKE_FIND_ROOT_PATH` is set appropriately) for its dependencies (`INTERFACE`) but not for itself (`PRIVATE`), thus failing the build.
fixes: https://github.com/Azure/azure-sdk-for-cpp/issues/1039
Adding `private` suffix for private headers.
Updating core test CMake script to include the /src folder from CORE to expose the private headers to the tests. Then tests don't need to do relative-path includes.
Root Cause:
Storage project generates coverage files in a different location (sdk/*/*cov_xml.xml) from where Core and Template (sdk/*/*/*cov_xml.xml). Basically one level up.
When I added the coverage for Storage, I didn’t know we were also running live tests for Core and Template pipelines. It failed on them because the xml files were not found.
In the PR, I add a new parameter to pipelines to change the default path, and also I am disabling LiveTests from Core and Template, since it only runs the same thing that we run on CI pipelines (We can enable it if we ever have some live tests)
fix: #1001
* revert change to xmlsoft link
* remove link
* Add DateFormat::Iso8601WithDecimals and DateFormat::Iso8601WithNoDecimals
* changelog
* add ToISO8601String with TimeFractionFormat
* update the name and add extra test
Update NextPolicy to that a reference instead of a pointer to the policies vector.
This way we don't need to check if the pointer is null.
Then, handle the case were no transport adapter was found
fixes: https://github.com/Azure/azure-sdk-for-cpp/issues/874
Adding CMake module to enable/disable transport adapters
TRANSPORT ADAPTER BUILD
Default: If no option is explicitly added, curl will be used for POSIX and WIN HTTP for WIndows
Windows: Both CURL and WIN_HTTP can be build to be used.
POSIX: Only CURL is acceptable. If WIN_HTTP is set, generate step will fail for user
Defines `BUILD_WIN_HTTP_TRANSPORT_ADAPTER` and `BUILD_CURL_HTTP_TRANSPORT_ADAPTER` for source code
Fixes#350
* Response<T> stores Nullable<T>
Drive-by: Replace `Nullable(const T&)` with `Nullable(T)` to avoid extra copy when initialized with an rvalue.
* Update sdk/core/azure-core/inc/azure/core/response.hpp
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
* Standardize header includes
Update sources to match guidelines
- `#include ""` when file is relative to the project
- `#include <>` when file is external to the project
Updated tests to mirror how a customer will include the header
- `#include <>`