diff options
author | pixel <pixel> | 2008-01-28 17:09:18 +0000 |
---|---|---|
committer | pixel <pixel> | 2008-01-28 17:09:18 +0000 |
commit | d20d4e4a03b3bcc3649efcc55f2563fe4e878112 (patch) | |
tree | 55457897d38fa9c0ead73dd40576453c7f277bdf | |
parent | 6dff2a525e47b71ce11c505b444a1123f5c77ccd (diff) |
Removing one useless buffer in the process.
-rw-r--r-- | lib/HttpServ.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index 57afd20..e902ae4 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: HttpServ.cc,v 1.59 2007-10-12 13:07:19 pixel Exp $ */ +/* $Id: HttpServ.cc,v 1.60 2008-01-28 17:09:18 pixel Exp $ */ #include <vector> @@ -799,21 +799,26 @@ class BuildHttpResponse : public Task { case 0: if (hr->Prepared()) { b = &hr->contents; + current = 2; } else { b = new Buffer(); hr->PrepareResponse(b); - t = new CopyJob(&hr->contents, b); - t->DryRun(); - delete t; + current = 1; } t = new CopyJob(b, out, -1, b != &hr->contents); - current = 1; WaitFor(t); Suspend(TASK_ON_HOLD); case 1: delete t; + t = new CopyJob(&hr->contents, out); + WaitFor(t); + current = 2; + Suspend(TASK_ON_HOLD); + + case 2: + delete t; } return TASK_DONE; |