Skip to content

Commit 0bb252b

Browse files
author
Ognjen Sobajic
committed
Placing http_exception where it should be.
1 parent 40f9ffe commit 0bb252b

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

Release/src/http/client/http_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ namespace web { namespace http
157157
// and host won't resolve
158158
if (std::find(method.begin(), method.end(), '\r') != method.end())
159159
{
160-
ctx->report_exception(std::runtime_error("invalid method string"));
160+
ctx->report_exception(http_exception("invalid method string"));
161161
return;
162162
}
163163

Release/tests/Functional/http/client/connections_and_errors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ TEST_FIXTURE(uri_address, invalid_method)
138138
{
139139
web::http::uri uri(U("https://www.bing.com/"));
140140
http_client client(uri);
141-
VERIFY_THROWS(client.request("my\rmethod").get(), std::runtime_error);
141+
VERIFY_THROWS(client.request("my\rmethod").get(), http_exception);
142142
}
143143

144144
// This test sends an SSL request to a non-SSL server and should fail on handshaking

Release/tests/Functional/http/client/outside_tests.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ TEST_FIXTURE(uri_address, outside_ssl_json,
115115

116116
// Send request
117117
web::http::client::http_client playlistClient(playlistUri.to_uri());
118-
119118
playlistClient.request(methods::GET).then([=](http_response playlistResponse) -> pplx::task<json::value>
120119
{
121120
return playlistResponse.extract_json();

0 commit comments

Comments
 (0)