h2load: http1: Send header + body in one packet

This commit is contained in:
Tatsuhiro Tsujikawa 2016-06-12 18:54:06 +09:00
parent 9f6c947a87
commit 2868370f9e
1 changed files with 3 additions and 3 deletions

View File

@ -176,16 +176,16 @@ int Http1Session::submit_request() {
client_->record_request_time(req_stat); client_->record_request_time(req_stat);
client_->wb.append(req); client_->wb.append(req);
// TODO try read some data here
if (config->data_fd == -1 || config->data_length == 0) { if (config->data_fd == -1 || config->data_length == 0) {
// increment for next request // increment for next request
stream_req_counter_ += 2; stream_req_counter_ += 2;
}
return 0; return 0;
} }
return on_write();
}
int Http1Session::on_read(const uint8_t *data, size_t len) { int Http1Session::on_read(const uint8_t *data, size_t len) {
auto nread = http_parser_execute(&htp_, &htp_hooks, auto nread = http_parser_execute(&htp_, &htp_hooks,
reinterpret_cast<const char *>(data), len); reinterpret_cast<const char *>(data), len);