Skip to content

Commit

Permalink
Remove unnecessary formatting changes to reduce diff - introduced dur…
Browse files Browse the repository at this point in the history
…ing merge due to auto format extension
  • Loading branch information
atbagga committed Oct 27, 2021
1 parent 32cb396 commit 27ca4a3
Show file tree
Hide file tree
Showing 7 changed files with 660 additions and 709 deletions.
3 changes: 2 additions & 1 deletion Release/include/cpprest/oauth2.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ class oauth2_config
pplx::task<void> token_from_client_credentials()
{
uri_builder ub;
ub.append_query(details::oauth2_strings::grant_type, details::oauth2_strings::client_credentials, false);
ub.append_query(
details::oauth2_strings::grant_type, details::oauth2_strings::client_credentials, false);
return _request_token(ub);
}

Expand Down
408 changes: 203 additions & 205 deletions Release/src/http/client/http_client_asio.cpp

Large diffs are not rendered by default.

356 changes: 176 additions & 180 deletions Release/src/http/client/http_client_winhttp.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Release/src/http/client/x509_cert_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class cf_ref
{
static_assert(sizeof(cf_ref<T>) == sizeof(T), "Code assumes just a wrapper, see usage in CFArrayCreate below.");
}
cf_ref() : value(nullptr) { }
cf_ref() : value(nullptr) {}
cf_ref(cf_ref&& other) : value(other.value) { other.value = nullptr; }

~cf_ref()
Expand Down
4 changes: 2 additions & 2 deletions Release/src/http/common/x509_cert_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace details
struct winhttp_cert_context
{
PCCERT_CONTEXT raw;
winhttp_cert_context() CPPREST_NOEXCEPT : raw(nullptr) { }
winhttp_cert_context() CPPREST_NOEXCEPT : raw(nullptr) {}
winhttp_cert_context(const winhttp_cert_context&) = delete;
winhttp_cert_context& operator=(const winhttp_cert_context&) = delete;
~winhttp_cert_context()
Expand All @@ -47,7 +47,7 @@ struct winhttp_cert_context
struct winhttp_cert_chain_context
{
PCCERT_CHAIN_CONTEXT raw;
winhttp_cert_chain_context() CPPREST_NOEXCEPT : raw(nullptr) { }
winhttp_cert_chain_context() CPPREST_NOEXCEPT : raw(nullptr) {}
winhttp_cert_chain_context(const winhttp_cert_chain_context&) = delete;
winhttp_cert_chain_context& operator=(const winhttp_cert_chain_context&) = delete;
~winhttp_cert_chain_context()
Expand Down
514 changes: 239 additions & 275 deletions Release/src/websockets/client/ws_client_wspp.cpp

Large diffs are not rendered by default.

82 changes: 37 additions & 45 deletions Release/tests/functional/http/client/connections_and_errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,12 @@ SUITE(connections_and_errors)

streams::producer_consumer_buffer<uint8_t> buf;

listener.support(
[buf](http_request request)
{
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
response.headers().add(header_names::connection, U("close"));
request.reply(response);
});
listener.support([buf](http_request request) {
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
response.headers().add(header_names::connection, U("close"));
request.reply(response);
});

{
http_client_config config;
Expand All @@ -307,14 +305,12 @@ SUITE(connections_and_errors)

streams::producer_consumer_buffer<uint8_t> buf;

listener.support(
[buf](http_request request)
{
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
response.headers().add(header_names::connection, U("close"));
request.reply(response);
});
listener.support([buf](http_request request) {
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
response.headers().add(header_names::connection, U("close"));
request.reply(response);
});

{
http_client_config config;
Expand Down Expand Up @@ -354,20 +350,18 @@ SUITE(connections_and_errors)
pplx::cancellation_token_source source;
pplx::extensibility::event_t ev;

listener.support(
[&](http_request request)
{
streams::producer_consumer_buffer<uint8_t> buf;
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
request.reply(response);
ev.wait();
buf.putc('a').wait();
buf.putc('b').wait();
buf.putc('c').wait();
buf.putc('d').wait();
buf.close(std::ios::out).wait();
});
listener.support([&](http_request request) {
streams::producer_consumer_buffer<uint8_t> buf;
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
request.reply(response);
ev.wait();
buf.putc('a').wait();
buf.putc('b').wait();
buf.putc('c').wait();
buf.putc('d').wait();
buf.close(std::ios::out).wait();
});

auto responseTask = c.request(methods::GET, source.get_token());
http_response response = responseTask.get();
Expand Down Expand Up @@ -449,21 +443,19 @@ SUITE(connections_and_errors)
pplx::extensibility::event_t ev;
pplx::extensibility::event_t ev2;

listener.support(
[&](http_request request)
{
streams::producer_consumer_buffer<uint8_t> buf;
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
request.reply(response);
buf.putc('a').wait();
buf.putc('b').wait();
ev.set();
ev2.wait();
buf.putc('c').wait();
buf.putc('d').wait();
buf.close(std::ios::out).wait();
});
listener.support([&](http_request request) {
streams::producer_consumer_buffer<uint8_t> buf;
http_response response(200);
response.set_body(streams::istream(buf), U("text/plain"));
request.reply(response);
buf.putc('a').wait();
buf.putc('b').wait();
ev.set();
ev2.wait();
buf.putc('c').wait();
buf.putc('d').wait();
buf.close(std::ios::out).wait();
});

auto response = c.request(methods::GET, source.get_token()).get();
ev.wait();
Expand Down

0 comments on commit 27ca4a3

Please sign in to comment.