summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/HttpServ.cc15
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;