From 2868370f9edbbb351a42a3a96322b8d8c4a517fb Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 12 Jun 2016 18:54:06 +0900 Subject: [PATCH] h2load: http1: Send header + body in one packet --- src/h2load_http1_session.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/h2load_http1_session.cc b/src/h2load_http1_session.cc index 09446092..b1fddccb 100644 --- a/src/h2load_http1_session.cc +++ b/src/h2load_http1_session.cc @@ -176,14 +176,14 @@ int Http1Session::submit_request() { client_->record_request_time(req_stat); client_->wb.append(req); - // TODO try read some data here - if (config->data_fd == -1 || config->data_length == 0) { // increment for next request stream_req_counter_ += 2; + + return 0; } - return 0; + return on_write(); } int Http1Session::on_read(const uint8_t *data, size_t len) {