File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,11 @@ class connection
96
96
void handle_chunked_body (const boost::system::error_code& ec, int toWrite);
97
97
void dispatch_request_to_listener ();
98
98
void request_data_avail (size_t size);
99
- void do_response (bool bad_reqiest =false );
99
+ void do_response (bool bad_request =false );
100
100
template <typename ReadHandler>
101
101
void async_read_until_buffersize (size_t size, ReadHandler handler);
102
102
void async_process_response (http_response response);
103
- void cancel_sending_response_with_error (http_response response, std::exception_ptr);
103
+ void cancel_sending_response_with_error (http_response response, std::exception_ptr);
104
104
void handle_headers_written (http_response response, const boost::system::error_code& ec);
105
105
void handle_write_large_response (http_response response, const boost::system::error_code& ec);
106
106
void handle_write_chunked_response (http_response response, const boost::system::error_code& ec);
Original file line number Diff line number Diff line change @@ -140,13 +140,12 @@ void connection::handle_http_line(const boost::system::error_code& ec)
140
140
else if (boost::iequals (http_verb, http::methods::CONNECT)) http_verb = http::methods::CONNECT;
141
141
else if (boost::iequals (http_verb, http::methods::OPTIONS)) http_verb = http::methods::OPTIONS;
142
142
143
- // Check to see if there is not allowed character on the input
144
-
143
+ // Check to see if there is not allowed character on the input
145
144
if (!web::http::details::validate_method (http_verb))
146
145
{
147
146
m_request.reply (status_codes::BadRequest);
147
+ m_close = true ;
148
148
do_response (true );
149
- finish_request_response ();
150
149
return ;
151
150
}
152
151
@@ -443,15 +442,15 @@ void connection::do_response(bool bad_request)
443
442
}
444
443
// before sending response, the full incoming message need to be processed.
445
444
if (bad_request)
446
- {
447
- async_process_response (response);
448
- }
449
- else
450
- {
451
- m_request.content_ready ().then ([=](pplx::task<http::http_request>) {
452
- async_process_response (response);
453
- });
454
- }
445
+ {
446
+ async_process_response (response);
447
+ }
448
+ else
449
+ {
450
+ m_request.content_ready ().then ([=](pplx::task<http::http_request>) {
451
+ async_process_response (response);
452
+ });
453
+ }
455
454
});
456
455
}
457
456
You can’t perform that action at this time.
0 commit comments