Repository: trafficserver Updated Branches: refs/heads/master 6e1657cd1 -> e564ec9b9
TS-2877: http_load waits until timeout when response body is zero Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e564ec9b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e564ec9b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e564ec9b Branch: refs/heads/master Commit: e564ec9b9c4b6442c7a64ed67003b6f1d69e74a5 Parents: 6e1657c Author: Masaori Koshiba <[email protected]> Authored: Thu Jun 5 10:00:24 2014 -0700 Committer: James Peach <[email protected]> Committed: Thu Jun 5 10:06:14 2014 -0700 ---------------------------------------------------------------------- CHANGES | 5 +++++ tools/http_load/http_load.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e564ec9b/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 98805b3..5a2ea66 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ -*- coding: utf-8 -*- +Changes with Apache Traffic Server 5.1.0 + + *) [TS-2877] http_load waits until timeout when response body is zero. + Author: Masaori Koshiba <[email protected]> + Changes with Apache Traffic Server 5.0.0 *) [TS-2875] Change hwloc library env variables from hwloc_ to HWLOC_. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e564ec9b/tools/http_load/http_load.c ---------------------------------------------------------------------- diff --git a/tools/http_load/http_load.c b/tools/http_load/http_load.c index 8c86029..4765361 100644 --- a/tools/http_load/http_load.c +++ b/tools/http_load/http_load.c @@ -2715,6 +2715,19 @@ handle_read(int cnum, struct timeval *nowP) } } + + if (connections[cnum].conn_state == CNST_READING && connections[cnum].content_length == 0) { +#ifdef DEBUG + fprintf(stderr, "[handle_read] content_length is 0, close connection\n"); +#endif + if (connections[cnum].keep_alive > 0) + connections[cnum].reusable = 1; + + close_connection(cnum); + + return; + } + break; case CNST_READING:
