Skip to content

Releases: microsoft/cpprestsdk

v2.4.0

20 Nov 21:55
Compare
Choose a tag to compare

Release Notes

oauth

  • Fixed memory leak with OAuth 1 in the success case. #321
  • OAuth1 added support for parameters in POST request body if Content-Type is application/x-www-form-urlencoded.
  • OAuth1 fixed some parameters which were incorrectly encoded twice.
  • OAuth1 added support for additional provider parameters on the token.

websocket_client

  • Added a new websocket_client class, websocket_client_class, that supports using callbacks instead for receiving messages and when the connection is closed. #15
  • Fixed issues around the websocket_client destructor taking the loader lock causing hangs/crashes if dynamically loading/unloading in a dll at runtime on Windows. #309, #233
  • Fixed memory leaks coming from OpenSSL when using secure websocket client.

http_client

  • Fixed http_client constructor taking parameters by value and performing a lot of moves and sometimes copying again. Now everything cleaner is passed by const reference. In the future if performance critical another overload can be added.
  • Removed unnecessary exception_ptr stored per request on all but WinRT platforms, saving space.
  • Misc cleanup in asio based http_client, renaming classes to not contain 'linux', making more data/methods private, removing some unnecessary usage of shared_ptr parameters and unnecessary indirection.
  • Fixed memory leak in asio based http_client with 'https' requests. #326
  • Fixed race condition in asio based http_client when obtaining a connection from the connection pool. #320
  • Deprecated http_client_config::set_guarantee_order(...) option. It is confusing and simplifies the implementation if removed. If request ordering is a requirement it can always be done manually with task continuations. In the future a better option to expose would be to configure the max number of allowed concurrent connections.
  • Fixed an issue in Boost based http_client where connections that encounter an error were being pooled for reuse. Now all connections that hit any errors are properly shutdown and closed.

http_listener

  • Updated to Boost based implementation to include underlying Boost error code in exceptions. #224
  • Updated a bunch of parameters in Boost based implementation to pass by const reference instead of by value.
  • Fixed problem in Boost based implementation where if an error occurred while processing the request body then the event from http_request::content_ready() won't be signaled. #220

uri

  • Fixed issue with uri_builder not including user information when calling to_string() and to_uri(). #329

json

  • Fixed a small memory leak in locale support for json library.

miscellaneous

  • Moved all the non public headers under the cpprest include folder into a details subfolder.
  • Removed a bunch of unnecessary pragma warning suppressions. This removes a ton of warnings when using Clang.
  • Renamed a bunch of source files to better reflect their contents. For example http_linux.cpp is now http_client_asio.cpp.
  • Cleaned up and combined the *_compat.h header files into one more manageable file making it easier to share settings.
  • Removed a bunch of unnecessary macros/defines.
  • Public API code documentation improvements for reference docs.
  • Fixed a conversion bug in datetime::utc_now() causing the seconds to be off potentially by 100 nanoseconds.
  • Added /detectleaks option for TestRunner when running on Windows.

Windows

  • Updated all the solution files to use the VS2013 shared projects feature. With this change all the source code is present in the IDE regardless of the platform. Now it is easier to develop in VS for other platforms as well.
  • Removed the _MS_WINDOWS macro, _WIN32 should be used instead.
  • Updated NuGet package to include CPPREST_TARGET_XP define if targeting XP, otherwise http_client_config size mismatches can occur leading to crashes.
  • Fixed an issue with PHONE8 define causing problems if not defined when targeting Windows Phone 8. The macro has now been removed.
  • We now statically link with OpenSSL on Windows and so our NuGet package no longer has the OpenSSL dependency. This makes deployment easier for customers. #308
  • Worked around a VS2015 compiler devirtualization bug causing AVs, using /d2notypeopt. #314, #315
  • Changed name of powershell VS setup script for VS2015.

Android

  • Added Android vcxproj files for Visual Studio and included them in the solution files.
  • Fixed incorrect _M_ARM macro check that lead to websockets being excluded on Android.
  • Added support for the Windows x86 emulator. Android NuGet package now contains binaries for it as well.
  • Fixed lots of warning with Clang, turned on treating warnings as errors when building on Windows. #323
  • Added vxproj files for tests and an Android test runner.

iOS

  • Added a XCode unit test bridge to enable easily running tests for iOS. Can be used from command line with xcodebuild. #105

v2.3.0

20 Nov 21:57
Compare
Choose a tag to compare

Release Notes

Please note this will be the last release that we include binaries for Visual Studio 2012 in our NuGet package.

http_client

  • Implemented server certificate verification on Android. #242
  • Added usage of Boost ssl::context::default_workarounds for compatibility with somewhat broken servers.
  • Fixed issue with server certification verification if multiple requests are made on iOS, OS X, and Android.
  • Remove unnecessary setting of Content-Length header in HTTP requests to zero.
  • Updated documentation for http_request default constructor and made default to the HTTP GET method to avoid ambiguity. #273
  • For sending request bodies added overloads on Windows for directly working with UTF-8 strings. This saves copies and extra moves on many platforms.
  • Fixed several issues around timeouts and cancellation with the Boost based implementation. Also addressed several places timeouts weren't being handle properly. #280
  • Improved error messages with WinHttp based implementation to include error code and message in the exception what() string.
  • Fixed an issue where a blocking wait was being used to close the response stream and any exceptions coming out of the returned task were not handled.

websocket_client

  • All of the websocket features have been moved out of the experimental namespace.
  • Implemented 'wss' support for Android/iOS/OSX/Linux/Windows desktop. #255
  • HTTP headers for initial HTTP request can be specified now on the non-winrt implementation as well. #251
  • Added subprotocol API support. New APIs exist on websocket_client_config class. 206
  • Added overloads for websocket_outgoing_msg::set_utf8_message() and websocket_outgoing_msg::set_binary_message() which allows the user to not specify stream length. #152
  • Poco is no longer used as test server for WinRT tests, Websocketpp is used in all cases. #221
  • Improved parameter passing in many locations, adding r-value references for string message data.
  • Improved error messages with both the websocketpp and winrt implementations.
  • Updated websocketpp library to 0.3.0 version.
  • Added a Visual Studio visualizer for websockets. #120
  • Fixed spelling mistake on an API. Renamed websocket_incoming_message::messge_type() to websocket_incoming_message::message_type().
  • Storage improvements on websocket message classes. Saving a heap allocation, a pointer, and a size_t.
  • Fixed connection abort\disconnect issue in winrt implementation. #181

http_listener

  • Initiating multiple close() calls on an http_listener no longer results in a race condition. Note: ~http_listener does invoke close(), even though the user should close it before destruction. #192

streams

  • Writing to standard C++ I/O streams with read_to_end() will now throw an exception if it fails. #244
  • Fixed reading files larger than 4GB on Windows, if on 64bit. #161
  • Including the streams.h header file no longer injects a specialization into std::. #125
  • Fixed several places that could cause blocking waits. #135
  • Removed an unnecessary size_t from container buffer, saving space.

json

  • Adding the ability to perform exception free parsing. All the parsing APIs now take a std::error_code as a second parameter by reference.
  • Fixed issues around JSON library assuming the current local is "C". #118
  • Added overload when constructing json string values to indicate whether or not the string contains any characters that need to be escaped. If the string is known to not contain any characters that need escaping, then the performance is better.
  • Fixed issue with Unicode escaping for code points over 127. #252

misc

  • The run_tests.sh script has been removed. The tests can be run by invoking the testrunner directly. #182
  • Various reference documentation improvements.
  • Updated .gitignore to account for NuGet packages directory. #282
  • Passwords are now stored in memory encrypted. The API web::credentials::password() has been deprecated.
  • Renamed some folders to use lower case names.

Windows

  • Added support for Visual Studio 2015 for desktop applications. #278. Please note websockets are not included with Visual Studio 2015 yet.
  • Added support for Windows Phone 8.1 Silverlight. #227
  • Fixed issue with the XP project file not loading correctly in the solution. #262
  • Visual Studio project files have there packages.config separated out, only pulling in the exact NuGet packages necessary for that project now. #285
  • Added OpenSSL as a new dependency on Windows desktop, for secure websockets. Due to the unconditional dependency this causes the OpenSSL dlls by default to be included in the Windows Store app package. There are a variety of ways to temporarily to work around this issue. The vcxproj file can be directly edited to remove importing the OpenSSL targets file. Or the NuGet package can be installed from the using the NuGet package manager console to avoid the dependencies:
  • Install-Package -Id cpprestsdk -IgnoreDependencies

Android

  • Updated to Android NDK r10.
  • Moved from using gcc to clang.
  • Moved to produce a static library as the default instead of a shared library.
  • Added a NuGet package for cross platform development with Visual Studio 2015, currently only supporting the ARM architecture.

iOS

  • Updated iOS 8 SDK.
  • Updated iOS build script to use a patch to fix the Boost version used to be 1.56.

v2.2.0: Revert "Disabling oauth1."

20 Nov 22:02
Compare
Choose a tag to compare

Release Notes

Features

oAuth (experimental)

  • Added library support for oAuth 2.0 and 1.0 in an experimental namespace while we fine tune the API.

Android

  • Added support for the Android platform. Please note SSL certification validation for the http_client isn't implemented yet, so using https with the http_client will fail during handshake unless certification validation is disabled. Will be fixed in next release, bug 242. UPDATE: Please note this has been fixed in the development branch now.

Bug Fixes & Improvements

Linux

  • Updated to requirements for Boost to version 1.54 and Ubuntu 14.04.

OS X, iOS

  • Replace internally to use boost locks instead of from standard library due to bug.

http_client

  • Improve timeouts to be reset and work properly when data is still being written.
  • Added configuration option to buffer request body data on Windows Desktop. This can be helpful for situations where authentication challenges might occur.
  • Improved performance of Windows Desktop client significantly when dealing with HTTP responses if setting the chunksize appropriately.
  • Removed http_response::error_code() API. This was bad API that shouldn't have existed. Error codes are reported through http_exception with a std::error_code.
  • Added option to extract_string and extract_json to force regardless of Content-Type header and treat as UTF-8.
  • Added tcp socket connection pooling on our non-Windows http_client implementation.
  • Implemented http_client cancellation on Linux/iOS/OS X.
  • Implemented SSL server certificate checking for iOS/OS X.

http_listener

  • Fix a merge error that accidentally removed https support on Windows.
  • Improve close semantics so you no longer have to make sure to respond to all requests and destroy all http_request/http_response instances, bug 205.
  • Fix an issue where an error during processing could cause a hang on iOS/OS X/Linux.

websocket client

  • Adding support for Windows Phone 8.1.
  • BREAKING API CHANGE - Removed the APIs for sending message fragments, we only support sending full messages.
  • BREAKING API CHANGE - moved specifying the host URI from the constructor to the connect API.

json

  • Added application/x-json to known MIME types. Bug 197.

miscellaneous

  • Changes to make work for FreeBSD 10+
  • Added options to cmake for building samples, tests, separately
  • Removed a bunch of unnecessary defines from the Linux/apple/windows compat header files.

v2.1.0

20 Nov 22:06
Compare
Choose a tag to compare

Release Notes

Here is a summary of the changes included in this release:

Websockets Beta on non-Windows store platforms:
We now have initial beta implementation of websockets on all platforms: Linux, OS X, iOS, Windows Desktop.
This library is written on top of Websocketpp, which uses boost. Hence you will need the Boost packages to build the C++ REST SDK on Windows. The "How to setup, build, and run tests on Windows" page describes how to fetch the Boost dependencies.

Windows Phone 8.1 support:
Windows Phone 8.1 binaries will be shipped with our NuGet Package.

Additional features:

  • HTTPS support for http_listener on Windows.
  • Updated the Linux/OS X/iOS binary name to include the versioning.
  • Added XP support for 2013.
  • Additional Websockets features on Windows store: Added support for sending HTTP headers, authentication, proxies.
  • Miscellaneous bug fixes in streams, http_listener and other code cleanup.

A highlight of this release is it includes community contributions for some Casablanca features. A special thanks to the contributors for helping improve Casablanca for everyone. If you are interested in making contributions, contact us at askcasablanca at Microsoft dot com.

Going forward, we will be doing all development publicly on CodePlex. This implies:

  • The “development” branch will always be up-to-date with our latest changes.
  • We will actively track the features and bug fixes that we are working on under the CodePlex:Issues section.

v2.0.1

20 Nov 22:15
Compare
Choose a tag to compare

Release Notes

This is a point release that fixes the following customer reported issues:

  • Precision issue with parsing doubles in the JSON library.
  • http_client was not properly detecting the message body length when indicated by closing connection.
  • Query strings were encoded twice at the listener side.
  • Large file size of the CppRest Nuget package.

Also, please note that we are only distributing Windows binaries through our NuGet package.

v2.0.0

20 Nov 22:17
Compare
Choose a tag to compare

Release Notes

Starting with 2.0.0 we are only distributing Windows binaries through our NuGet package. This allows us to be more efficient and not maintain an MSI. We also feel it gives users a better experience not having to mess with include paths, libs, and dlls.

Here is a summary of the changes for this release, please note for the first time we made a couple of breaking API changes in our JSON library. We take breaking changes very seriously and believe these are valuable improvements that allow us to continue to expand and improve the API moving forward.

Misc

  • General bug fixes – including many reported on CodePlex
  • Removed MSIs – now only distributing Windows binaries through NuGet
  • Added Visual Studio debugger natvis file to NuGet package
  • Added support for cmake for non-Windows platforms

WebSockets

  • Added initial Beta implementation for WebSockets on Windows store, other platforms will come in future releases

Platform Support

  • Added support for OS X
  • Added support for iOS

Http Client

  • Added support for request cancellation through cancellation_tokens for Windows platforms, others will be added in the future

Json

  • Added 64 bit integer support. There is a new class json::number that can be retrieved with the json::value::as_number() API. It contains methods for testing and getting a number as int32, uint32, int64, and uint64.
  • Changed the underlying storage for arrays and added a new class json::array for operations specific to arrays. Can be obtained from the json::value::as_array() API.
  • Changed the underlying storage for objects and added a new class json::object for operations specific to objects. Can be obtained from the json::value::as_object() API.
  • Breaking Change - Changed how iteration over json arrays and objects is performed. No longer is an iterator of std::pair<json::value, json::value> returned. Instead there is a separate iterator for arrays and objects on the json::array and json::object class respectively. This allows us to make performance improvements and continue to adjust accordingly. The array iterator returns json::values, and the object iterator now returns std::pair<string_t, json::value>.
  • 25% to 30% improvement for parsing and traversing the object model
  • Breaking Change - Const overload of index operator[] on json::value – in prior releases the behavior of the const/non-const overloads where different. This is inconsistent and confusing. The operator[] now can always end up modifying the underlying internal storage so is never const. If you want true const semantics, the json::value::at(…) API can be used.
  • Deprecated a couple of inconsistent/confusing or bad performance APIs, all have functional replacements
  • json::value::to_string() – this API really performance serialization and is easy to confuse with json::value::as_string(). The replacement is json::value::serialize().
  • json::value::get(…) – this API had bad performance since it returned a json::value with value semantics. It also can be confusing to use if you think you are modifying the underlying internal data. Instead use operator[] or json::value::at(…).

Uris

  • Performance improvement avoiding std::isalnum’s global lock
  • Moved URI functionality from web::http namespace to just under web. For backwards compatibility using statements have been inserted for customers directly using from http_client.h.

Http Listener

  • Breaking Change - Removed pipeline staging feature. It was fundamentally broken and didn’t work at all for processing responses.
  • Fixed issues with the close semantics of shutting down a listener.

Streams

  • Deprecated ‘blittable’ versions of stream read/write. This API is dangerous and only works for trivial types on single byte character streams. It also has bad performance. The functionality can easily be accomplished with the other read/write overloads or getn/putn directly on the stream buffer.

VS solution files and samples

  • Cleaned up our solution files and build instructions for all the platforms a bit
  • Made sure project files exist for both Visual Studio 2012 and 2013, when appropriate

v1.4.0

20 Nov 22:25
Compare
Choose a tag to compare

Release Notes

Do you like having to mess with setting up header file includes, library, and dll paths? Consider trying out using our Nuget package instead of our MSI. Whether you target desktop, XP, Windows store, Windows Phone all you have to do is just reference the package and you are ready to go.

Please note XP and Windows Phone 8 development are only supported with Visual Studio 2012.

In addition to the regular bug fixing this release includes the following:

  • Json performance improvements, 3x to 4x improvements for parsing, 2x to 3x for serialization. With more improvements coming in future releases.
  • Added line/column information for Json parsing.
  • Added timeout options to http_listener - only implemented on Windows so far.
  • Added XP and Windows Phone 8 support to our Nuget package for VS 2012.
  • Added a new http_listener sample CasaLens.
  • Added project files for samples for VS 2013.

v1.3.1

20 Nov 22:26
Compare
Choose a tag to compare

Release Notes

This is a point release that fixes the following issues with 1.3:

  • Two additional APIs to determine whether a json::value is a integer number or a double number (this fix was requested by a partner team at Microsoft)
  • Fix an issue with Casablanca WinRT binaries that caused them to be rejected by the App Store.

v1.3.0

20 Nov 22:29
Compare
Choose a tag to compare

Release Notes

This release fixes multiple customer reported issues as well as the following:

  • Full support for Dev12 binaries and project files
  • Full support for Windows XP
  • New sample highlighting the Client and Server APIs : BlackJack
  • Expose underlying native handle to set custom options on http_client
  • Improvements to Listener Library

Note: Dev10 binaries have been dropped as of this release, however the Dev10 project files are still available in the Source Code

v1.2.0

20 Nov 22:31
Compare
Choose a tag to compare

Release Notes

The following is a list of the major aspects of this release:

  • Adding support for HTTPS for the Linux version of the library
  • Adding experimental support for Windows XP (client features only)
  • Some performance improvements, especially JSON parsing
  • Added size() and has_size() to stream buffers
  • Side-by-side installation with v1.1
  • As always, bug fixes

We are labeling this release 'Beta' since there are features that are still experimental, i.e. haven't been tested in depth:

  • Windows Phone 8
  • Windows XP client features
  • http_listener

Note on Visual Studio 2010 support

Our plan is to make this the last release that supports Visual Studio 2010. We're planning to add support for Visual Studio 2013 in the next release. However, if VS 2010 is still important to you, let us know: https://casablanca.codeplex.com/discussions