Revision: 45
Author: matt
Date: 2006-08-05 03:44:23 +0000 (Sat, 05 Aug 2006)
Log Message:
-----------
Make sure we only disconnect after all the data has been sent
Modified Paths:
--------------
trunk/lib/AxKit2/Connection.pm
Modified: trunk/lib/AxKit2/Connection.pm
===================================================================
--- trunk/lib/AxKit2/Connection.pm 2006-08-05 02:44:48 UTC (rev 44)
+++ trunk/lib/AxKit2/Connection.pm 2006-08-05 03:44:23 UTC (rev 45)
@@ -179,7 +179,7 @@
$self->hook_response($hd)
);
- $self->http_response_sent();
+ $self->write(sub { $self->http_response_sent() });
}
# called when we've finished writing everything to a client and we need
@@ -199,7 +199,7 @@
# do a final read so we don't have unread_data_waiting and RST
# the connection. IE and others send an extra \r\n after POSTs
my $dummy = $self->read(5);
-
+
# close if we have no response headers or they say to close
$self->close("no_keep_alive");
return 0;