Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2ea1bbb
bugfix #446: fixed issue with wildchar handling on linux.
ashwinravianandan May 26, 2017
a079094
fix build on linux use clang
Jun 7, 2017
07451e4
Added Nuget.Config.
JunielKatarn Jun 16, 2017
96165e1
since win 8.1 the WINHTTP_ACCESS_TYPE_DEFAULT_PROXY is depricated. Be…
Jul 6, 2017
7b47d0c
Fix memory leak of WINHTTP_PROXY_INFO fields
vadz Jul 7, 2017
c24bc6a
Fix memory leak of WINHTTP_PROXY_INFO fields
vadz Jul 7, 2017
eb108ad
Fall back on WinINET proxy settings if WinHTTP proxy is not defined
vadz Jul 8, 2017
0e998d1
Fix unreachable statement warning from MSVC after ICC warning fix
vadz Jul 8, 2017
f5db252
Merge pull request #497 from vadz/fix-msvc-build
ras0219-msft Jul 9, 2017
5d11bb3
Avoid spurious errors when handling HTTP responses without body
vadz Jul 9, 2017
0a9a84c
Merge pull request #498 from vadz/fix-no-body-errors
ras0219-msft Jul 9, 2017
0206caa
add support for using the proxy settings from IE
Jul 11, 2017
f9774be
Fix cnn outside test
Jul 11, 2017
5d138eb
cleanup the changes
Jul 11, 2017
ba7ee44
Merge pull request #499 from c72578/outside_test_cnn_2017-07-11
ras0219-msft Jul 11, 2017
11fd953
intedation
Jul 12, 2017
1406001
Fix google outside tests
Jul 12, 2017
6860348
Merge pull request #476 from JunielKatarn/nugetconfig
ras0219-msft Jul 12, 2017
4c7e1bf
Merge pull request #501 from c72578/2017-07-12_outside_tests_google
ras0219-msft Jul 12, 2017
6cac701
Merge pull request #465 from fcharlie/master
ras0219-msft Jul 12, 2017
7dca8e4
Merge pull request #447 from ashwinravianandan/bugfix/#446
ras0219-msft Jul 12, 2017
d4f707a
Fix build error with glibc 2.26, xlocale.h
c72578 Jul 13, 2017
f0238fa
FIX: make uri_builder::to_string(), ::to_uri() const
reneme Jul 14, 2017
2dcf4fd
Add support for retrieving remote address in HTTP listener
orudge Jul 17, 2017
4824434
Add test for request.remote_address()
orudge Jul 17, 2017
55ea692
Adding 308 "Permanent Redirect" to http_constants.dat
deeringc Jul 17, 2017
70c1b14
fix lambda capture 'this' is not used, clang 5.0 on ubuntu 16.04
Jul 20, 2017
907ea01
Merge pull request #504 from reneme/fix/uri_builder_constness
ras0219-msft Jul 20, 2017
dd8eddd
Disable setting secure protocols on XP. Fixes #510.
ras0219-msft Jul 24, 2017
935917a
Merge pull request #509 from fcharlie/master
ras0219-msft Jul 25, 2017
b2efa45
enable crl checks for windows tls
Aug 2, 2017
3f47656
use the right handle
Aug 2, 2017
ba1fdef
delete unused code
Aug 3, 2017
9bcde8b
c'tor early return if the string is empty
Aug 11, 2017
e212141
use a early return in case of empty string
Aug 14, 2017
d947fb5
add test for the crash bug
Aug 15, 2017
0642275
patch in SSL_R_SHORT_READ from https://github.com/LocutusOfBorg/webso…
Aug 22, 2017
91a548e
Fixed proxy credentials for http_client_asio
ChristophAlbert Aug 23, 2017
500f7a2
Merge pull request #527 from ChristophAlbert/master
ras0219-msft Aug 26, 2017
f20f378
Merge pull request #526 from edukaj/master
ras0219-msft Aug 26, 2017
a617976
Merge pull request #521 from xqp/fix/win32_encryption_throws_by_empty…
ras0219-msft Aug 26, 2017
1b7294c
Merge pull request #508 from deeringc/patch-1
ras0219-msft Aug 26, 2017
7964f1b
Merge pull request #507 from orudge/master
ras0219-msft Aug 26, 2017
da058b3
Don't assume AF_INET6 or AF_INET
ras0219-msft Aug 26, 2017
64dd067
Add comment(lib) for Ws2_32
ras0219-msft Aug 26, 2017
97ad067
Merge pull request #495 from vadz/proxy-info-memleak
ras0219-msft Aug 26, 2017
186717f
Merge pull request #502 from c72578/2017-07-13_asyncrt_utils_xlocale
ras0219-msft Aug 26, 2017
90ab8f7
Reformat
ras0219-msft Aug 26, 2017
d883eab
Merge pull request #516 from xqp/feature/enable-certificate-revocatio…
ras0219-msft Aug 26, 2017
92f1821
Clean up memory after call to WinHttpGetIEProxyConfigForCurrentUser
ras0219-msft Aug 26, 2017
a7ad987
Merge pull request #500 from xqp/use_system_proxy
ras0219-msft Aug 26, 2017
b7fa0b1
Merge branch 'use-ie-proxy-by-default' of https://github.com/vadz/cpp…
ras0219-msft Aug 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="packages" />
</config>
</configuration>
5 changes: 5 additions & 0 deletions Release/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR IOS)
if(ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -Wno-pointer-arith")
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(WARNINGS -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls)
set(LINUX_SUPPRESSIONS -Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs)
set(WARNINGS ${WARNINGS} ${LINUX_SUPPRESSIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
else()
set(WARNINGS -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls)
set(OSX_SUPPRESSIONS -Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs)
Expand Down
5 changes: 4 additions & 1 deletion Release/include/cpprest/asyncrt_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@

#ifndef _WIN32
#include <boost/algorithm/string.hpp>
#if !defined(ANDROID) && !defined(__ANDROID__) // CodePlex 269
#if !defined(ANDROID) && !defined(__ANDROID__) && !defined(__GLIBC__) // CodePlex 269
/* Systems using glibc: xlocale.h has been removed from glibc 2.26
The above include of locale.h is sufficient
Further details: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336db7492e47d2e8e72eb8af53b5506d */
#include <xlocale.h>
#endif
#endif
Expand Down
1 change: 1 addition & 0 deletions Release/include/cpprest/details/http_constants.dat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DAT(SeeOther, 303, _XPLATSTR("See Other"))
DAT(NotModified, 304, _XPLATSTR("Not Modified"))
DAT(UseProxy, 305, _XPLATSTR("Use Proxy"))
DAT(TemporaryRedirect, 307, _XPLATSTR("Temporary Redirect"))
DAT(PermanentRedirect, 308, _XPLATSTR("Permanent Redirect"))
DAT(BadRequest, 400, _XPLATSTR("Bad Request"))
DAT(Unauthorized, 401, _XPLATSTR("Unauthorized"))
DAT(PaymentRequired, 402, _XPLATSTR("Payment Required"))
Expand Down
12 changes: 12 additions & 0 deletions Release/include/cpprest/http_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,8 @@ class _http_request final : public http::details::http_msg_base, public std::ena

_ASYNCRTIMP void set_request_uri(const uri&);

const utility::string_t& remote_address() const { return m_remote_address; }

const pplx::cancellation_token &cancellation_token() const { return m_cancellationToken; }

void set_cancellation_token(const pplx::cancellation_token &token)
Expand Down Expand Up @@ -755,6 +757,8 @@ class _http_request final : public http::details::http_msg_base, public std::ena

void _set_base_uri(const http::uri &base_uri) { m_base_uri = base_uri; }

void _set_remote_address(const utility::string_t &remote_address) { m_remote_address = remote_address; }

private:

// Actual initiates sending the response, without checking if a response has already been sent.
Expand All @@ -778,6 +782,8 @@ class _http_request final : public http::details::http_msg_base, public std::ena
std::shared_ptr<progress_handler> m_progress_handler;

pplx::task_completion_event<http_response> m_response;

utility::string_t m_remote_address;
};


Expand Down Expand Up @@ -869,6 +875,12 @@ class http_request
/// </remarks>
const http_headers &headers() const { return _m_impl->headers(); }

/// <summary>
/// Returns a string representation of the remote IP address.
/// </summary>
/// <returns>The remote IP address.</returns>
const utility::string_t& get_remote_address() const { return _m_impl->remote_address(); }

/// <summary>
/// Extract the body of the request message as a string value, checking that the content type is a MIME text type.
/// A body can only be extracted once because in some cases an optimization is made where the data is 'moved' out.
Expand Down
5 changes: 5 additions & 0 deletions Release/include/cpprest/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,12 @@ namespace json
return m_value == other.m_value;
}
__assume(0);
// Absence of this return statement provokes a warning from Intel
// compiler, but its presence results in a warning from MSVC, so
// we have to resort to conditional compilation to keep both happy.
#ifdef __INTEL_COMPILER
return false;
#endif
}

private:
Expand Down
4 changes: 2 additions & 2 deletions Release/include/cpprest/uri_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ namespace web
/// Combine and validate the URI components into a encoded string. An exception will be thrown if the URI is invalid.
/// </summary>
/// <returns>The created URI as a string.</returns>
_ASYNCRTIMP utility::string_t to_string();
_ASYNCRTIMP utility::string_t to_string() const;

/// <summary>
/// Combine and validate the URI components into a URI class instance. An exception will be thrown if the URI is invalid.
/// </summary>
/// <returns>The create URI as a URI class instance.</returns>
_ASYNCRTIMP uri to_uri();
_ASYNCRTIMP uri to_uri() const;

/// <summary>
/// Validate the generated URI from all existing components of this uri_builder.
Expand Down
7 changes: 5 additions & 2 deletions Release/libs/websocketpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
endif()
set (WEBSOCKETPP_PLATFORM_TSL_LIBS ssl crypto)
set (WEBSOCKETPP_BOOST_LIBS system thread)
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++") # todo: is libc++ really needed here?
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x")
else()
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++") # todo: is libc++ really needed here?
endif()
if (NOT APPLE)
add_definitions (-DNDEBUG -Wall -Wno-padded) # todo: should we use CMAKE_C_FLAGS for these?
endif ()
Expand Down Expand Up @@ -241,4 +245,3 @@ install (FILES
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/websocketpp-config.cmake"
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/websocketpp-configVersion.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)

Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,13 @@ class connection : public lib::enable_shared_from_this<connection> {
*/
lib::error_code translate_ec(boost::system::error_code ec) {
if (ec.category() == boost::asio::error::get_ssl_category()) {
#if defined SSL_R_SHORT_READ
if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
return make_error_code(transport::error::tls_short_read);
#else
if (ERR_GET_REASON(ec.value()) == boost::asio::ssl::error::stream_truncated) {
return make_error_code(boost::asio::ssl::error::stream_truncated);
#endif
} else {
// We know it is a TLS related error, but otherwise don't know
// more. Pass through as TLS generic.
Expand Down
12 changes: 10 additions & 2 deletions Release/src/http/client/http_client_asio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ class asio_context : public request_context, public std::enable_shared_from_this
{
std::string header;
header.append("Proxy-Authorization: Basic ");
header.append(generate_base64_userpass(m_http_client->client_config().credentials()));
header.append(generate_base64_userpass(m_http_client->client_config().proxy().credentials()));
header.append(CRLF);
return header;
}
Expand Down Expand Up @@ -1229,9 +1229,17 @@ class asio_context : public request_context, public std::enable_shared_from_this
}
}

// Check for HEAD requests and status codes which cannot contain a
// message body in HTTP/1.1 (see 3.3.3/1 of the RFC 7230).
//
// note: need to check for 'chunked' here as well, azure storage sends both
// transfer-encoding:chunked and content-length:0 (although HTTP says not to)
if (m_request.method() == U("HEAD") || (!needChunked && m_content_length == 0))
const auto status = m_response.status_code();
if (m_request.method() == U("HEAD")
|| (status >= 100 && status < 200)
|| status == status_codes::NoContent
|| status == status_codes::NotModified
|| (!needChunked && m_content_length == 0))
{
// we can stop early - no body
const auto &progress = m_request._get_impl()->_progress_handler();
Expand Down
Loading