Skip to content

Commit 7a07d38

Browse files
committed
Merge branch 'development' into fixing#418
2 parents ff4f311 + 9052811 commit 7a07d38

File tree

29 files changed

+579
-156
lines changed

29 files changed

+579
-156
lines changed

Build/Common.Build.settings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<PropertyGroup>
3737
<OutputPath>$(BuildRoot)\Binaries\$(Platform)\$(Configuration)\</OutputPath>
3838
<OutDir>$(OutputPath)</OutDir>
39+
<IntDir>$(BuildRoot)\Intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
3940
<TestRoot>$(BuildRoot)\Release\Tests</TestRoot>
4041
<CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir>
4142
<CasablancaResourceDir>$(BuildRoot)\Release\Resource</CasablancaResourceDir>

Build/Release.Product.settings

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
<PropertyGroup>
3434
<InternalIncludeDir>$(CasablancaIncludeDir)</InternalIncludeDir>
35-
<IntDir>$(BuildRoot)\Intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
3635
</PropertyGroup>
3736

3837
<ItemDefinitionGroup>

Build/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<CppRestBaseFileName>cpprest</CppRestBaseFileName>
55
<CppRestSDKVersionMajor>2</CppRestSDKVersionMajor>
6-
<CppRestSDKVersionMinor>7</CppRestSDKVersionMinor>
6+
<CppRestSDKVersionMinor>8</CppRestSDKVersionMinor>
77
<CppRestSDKVersionRevision>0</CppRestSDKVersionRevision>
88
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
99
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>

Build_iOS/configure.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
1212
pushd OpenSSL-for-iPhone
1313
./build-libssl.sh
1414
popd
15-
mkdir openssl
16-
mv OpenSSL-for-iPhone/include openssl
17-
mv OpenSSL-for-iPhone/lib openssl
15+
mkdir -p openssl/lib
16+
cp -r OpenSSL-for-iPhone/bin/iPhoneOS8.2-armv7.sdk/include openssl
17+
cp OpenSSL-for-iPhone/include/LICENSE openssl
18+
lipo -create -output openssl/lib/libssl.a OpenSSL-for-iPhone/bin/iPhone*/lib/libssl.a
19+
lipo -create -output openssl/lib/libcrypto.a OpenSSL-for-iPhone/bin/iPhone*/lib/libcrypto.a
1820

1921
git clone https://github.com/cristeab/ios-cmake.git
2022
pushd ios-cmake

CONTRIBUTORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Gery Vessere ([email protected])
3434

3535
Cisco Systems
3636
Gergely Lukacsy (glukacsy)
37+
Chris Deering (deeringc)
3738

3839
Ocedo GmbH
3940
Henning Pfeiffer (megaposer)

Release/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ enable_testing()
77
set(WARNINGS)
88
set(ANDROID_STL_FLAGS)
99

10+
option(WERROR "Threat Warnings as Errors" ON)
11+
1012
# Platform (not compiler) specific settings
1113
if(IOS)
1214
set(IOS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Build_iOS")
@@ -73,7 +75,7 @@ elseif(ANDROID)
7375
set(BUILD_SAMPLES OFF)
7476
option(BUILD_TESTS "Build tests." ON)
7577
elseif(UNIX) # This includes OSX
76-
find_package(Boost REQUIRED COMPONENTS random chrono system thread regex filesystem)
78+
find_package(Boost 1.54 REQUIRED COMPONENTS random chrono system thread regex filesystem)
7779
find_package(Threads REQUIRED)
7880
if(APPLE AND NOT OPENSSL_ROOT_DIR)
7981
# Prefer a homebrew version of OpenSSL over the one in /usr/lib
@@ -189,7 +191,8 @@ else()
189191
endif()
190192

191193
set(Casablanca_LIBRARY ${LIB}cpprest)
192-
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK})
194+
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY}
195+
${Boost_LIBRARIES})
193196

194197
# Everything in the project needs access to the casablanca include directories
195198
include_directories(${Casablanca_INCLUDE_DIRS})

Release/include/cpprest/details/web_utilities.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace web
3030
namespace http { namespace client { namespace details {
3131
class winhttp_client;
3232
class winrt_client;
33+
class asio_context;
3334
}}}
3435
namespace websockets { namespace client { namespace details {
3536
class winrt_callback_client;
@@ -124,6 +125,7 @@ class credentials
124125
private:
125126
friend class http::client::details::winhttp_client;
126127
friend class http::client::details::winrt_client;
128+
friend class http::client::details::asio_context;
127129
friend class websockets::client::details::winrt_callback_client;
128130
friend class websockets::client::details::wspp_callback_client;
129131

Release/include/cpprest/oauth1.h

100644100755
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define _CASA_OAUTH1_H
2929

3030
#include "cpprest/http_msg.h"
31+
#include "cpprest/details/web_utilities.h"
3132

3233
namespace web
3334
{
@@ -479,6 +480,24 @@ class oauth1_config
479480
/// </summary>
480481
void clear_parameters() { m_parameters_to_sign.clear(); }
481482

483+
/// <summary>
484+
/// Get the web proxy object
485+
/// </summary>
486+
/// <returns>A reference to the web proxy object.</returns>
487+
const web_proxy& proxy() const
488+
{
489+
return m_proxy;
490+
}
491+
492+
/// <summary>
493+
/// Set the web proxy object that will be used by token_from_code and token_from_refresh
494+
/// </summary>
495+
/// <param name="proxy">A reference to the web proxy object.</param>
496+
void set_proxy(const web_proxy& proxy)
497+
{
498+
m_proxy = proxy;
499+
}
500+
482501
private:
483502
friend class web::http::client::http_client_config;
484503
friend class web::http::oauth1::details::oauth1_handler;
@@ -532,6 +551,8 @@ class oauth1_config
532551

533552
std::map<utility::string_t, utility::string_t> m_parameters_to_sign;
534553

554+
web::web_proxy m_proxy;
555+
535556
utility::nonce_generator m_nonce_generator;
536557
bool m_is_authorization_completed;
537558
};

Release/include/cpprest/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* ==--==
1717
*/
1818
#define CPPREST_VERSION_REVISION 0
19-
#define CPPREST_VERSION_MINOR 7
19+
#define CPPREST_VERSION_MINOR 8
2020
#define CPPREST_VERSION_MAJOR 2
2121

2222
#define CPPREST_VERSION (CPPREST_VERSION_MAJOR*100000+CPPREST_VERSION_MINOR*100+CPPREST_VERSION_REVISION)

Release/libs/websocketpp/websocketpp/connection.hpp

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,14 @@ typedef lib::function<void(lib::error_code const & ec)> write_frame_handler;
161161
* @todo Move this to configs to allow compile/runtime disabling or enabling
162162
* of protocol versions
163163
*/
164+
#if defined(_MSC_VER)
165+
#pragma warning(push)
166+
#pragma warning(disable : 4592)
167+
#endif
164168
static std::vector<int> const versions_supported = {0,7,8,13};
169+
#if defined(_MSC_VER)
170+
#pragma warning(pop)
171+
#endif
165172
#else
166173
/// Helper array to get around lack of initializer lists pre C++11
167174
static int const helper[] = {0,7,8,13};
@@ -534,7 +541,7 @@ class connection
534541

535542
/// Get maximum message size
536543
/**
537-
* Get maximum message size. Maximum message size determines the point at
544+
* Get maximum message size. Maximum message size determines the point at
538545
* which the connection will fail with the message_too_big protocol error.
539546
*
540547
* The default is set by the endpoint that creates the connection.
@@ -544,11 +551,11 @@ class connection
544551
size_t get_max_message_size() const {
545552
return m_max_message_size;
546553
}
547-
554+
548555
/// Set maximum message size
549556
/**
550-
* Set maximum message size. Maximum message size determines the point at
551-
* which the connection will fail with the message_too_big protocol error.
557+
* Set maximum message size. Maximum message size determines the point at
558+
* which the connection will fail with the message_too_big protocol error.
552559
* This value may be changed during the connection.
553560
*
554561
* The default is set by the endpoint that creates the connection.
@@ -563,7 +570,7 @@ class connection
563570
m_processor->set_max_message_size(new_value);
564571
}
565572
}
566-
573+
567574
/// Get maximum HTTP message body size
568575
/**
569576
* Get maximum HTTP message body size. Maximum message body size determines
@@ -579,7 +586,7 @@ class connection
579586
size_t get_max_http_body_size() const {
580587
return m_request.get_max_body_size();
581588
}
582-
589+
583590
/// Set maximum HTTP message body size
584591
/**
585592
* Set maximum HTTP message body size. Maximum message body size determines
@@ -683,14 +690,14 @@ class connection
683690
* @return An error code
684691
*/
685692
lib::error_code interrupt();
686-
693+
687694
/// Transport inturrupt callback
688695
void handle_interrupt();
689-
696+
690697
/// Pause reading of new data
691698
/**
692-
* Signals to the connection to halt reading of new data. While reading is paused,
693-
* the connection will stop reading from its associated socket. In turn this will
699+
* Signals to the connection to halt reading of new data. While reading is paused,
700+
* the connection will stop reading from its associated socket. In turn this will
694701
* result in TCP based flow control kicking in and slowing data flow from the remote
695702
* endpoint.
696703
*
@@ -702,7 +709,7 @@ class connection
702709
*
703710
* If supported by the transport this is done asynchronously. As such reading may not
704711
* stop until the current read operation completes. Typically you can expect to
705-
* receive no more bytes after initiating a read pause than the size of the read
712+
* receive no more bytes after initiating a read pause than the size of the read
706713
* buffer.
707714
*
708715
* If reading is paused for this connection already nothing is changed.
@@ -1357,7 +1364,7 @@ class connection
13571364
* Includes: error code and message for why it was failed
13581365
*/
13591366
void log_fail_result();
1360-
1367+
13611368
/// Prints information about HTTP connections
13621369
/**
13631370
* Includes: TODO
@@ -1506,7 +1513,7 @@ class connection
15061513

15071514
/// Detailed internal error code
15081515
lib::error_code m_ec;
1509-
1516+
15101517
/// A flag that gets set once it is determined that the connection is an
15111518
/// HTTP connection and not a WebSocket one.
15121519
bool m_is_http;

Release/src/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ if(UNIX)
5353
else()
5454
list(APPEND SOURCES pplx/pplxlinux.cpp)
5555
endif()
56-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS} -Werror -pedantic")
56+
57+
if(WERROR)
58+
set(WARNINGS "${WARNINGS} -Werror")
59+
endif()
60+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS} -pedantic")
5761
elseif(WIN32)
5862
set(SOURCES
5963
${SOURCES_COMMON}
@@ -99,7 +103,7 @@ target_link_libraries(${Casablanca_LIBRARY}
99103

100104
# Portions specific to cpprest binary versioning.
101105
set (CPPREST_VERSION_MAJOR 2)
102-
set (CPPREST_VERSION_MINOR 7)
106+
set (CPPREST_VERSION_MINOR 8)
103107
set (CPPREST_VERSION_REVISION 0)
104108

105109
if(WIN32)

Release/src/build/init.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Copy-Natvis($DestFolder)
55
if ((Test-Path $DestFolder) -eq $True)
66
{
77
# Update casablanca version for each release here.
8-
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_7.natvis";
8+
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_8.natvis";
99

1010
# Check to see if cpp rest natvis file for this version already exists
1111
# if not, then copy into user profile for Visual Studio to pick up

Release/src/build/vs12.winrt/packages.config

Lines changed: 0 additions & 3 deletions
This file was deleted.

Release/src/build/vs12.wp81/packages.config

Lines changed: 0 additions & 3 deletions
This file was deleted.

Release/src/build/vs12.wps81/packages.config

Lines changed: 0 additions & 3 deletions
This file was deleted.

Release/src/dirs.proj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<ItemGroup Condition="'$(DevToolsVersion)'=='120'">
66
<ProjectFile Include="build\vs12\casablanca120.vcxproj" Condition="'$(Platform)'!='ARM' or '$(WindowsSDKDesktopARMSupport)' == 'true'" />
77
<ProjectFile Include="build\vs12.xp\casablanca120.xp.vcxproj" Condition="'$(Platform)'!='ARM' and '$(RunCodeAnalysis)'!='true'" />
8-
<ProjectFile Include="build\vs12.wod\casablanca120.wod.vcxproj" Condition="'$(Platform)'!='ARM'" />
98
</ItemGroup>
109

1110
<ItemGroup Condition="'$(OsVersion)|$(DevToolsVersion)'=='6.2|120' or '$(OsVersion)|$(DevToolsVersion)'=='6.3|120'">
@@ -19,10 +18,9 @@
1918

2019
<ItemGroup Condition="'$(DevToolsVersion)'=='140'">
2120
<ProjectFile Include="build\vs14\casablanca140.vcxproj" Condition="'$(Platform)'!='ARM' or '$(WindowsSDKDesktopARMSupport)' == 'true'" />
22-
<ProjectFile Include="build\vs14.wod\casablanca140.wod.vcxproj" Condition="'$(Platform)'!='ARM'" />
2321
<ProjectFile Include="build\vs14.android\casablanca140.android.vcxproj" Condition="'$(Platform)'!='x64'"/>
2422
</ItemGroup>
25-
23+
2624
<ItemGroup Condition="'$(OsVersion)|$(DevToolsVersion)'=='6.3|140'">
2725
<ProjectFile Include="build\vs14.uwp\cpprestsdk140.uwp.vcxproj" />
2826
</ItemGroup>

0 commit comments

Comments
 (0)