- $conn->write("PUT /sha1 HTTP/1.0\r\n");
- delay();
- $conn->write("Content-Length: $len\r\n");
- delay();
- $conn->write("\r\n");
- is($td->kill, 1, 'started graceful shutdown');
- delay();
+ $conn->write("PUT /sha1 HTTP/1.0\r\nContent-Length: $len\r\n\r\n");
+
+ # XXX ugh, want a reliable and non-intrusive way to detect
+ # that the server has started buffering our partial request so we
+ # can reliably test graceful termination. Maybe making this and
+ # similar tests dependent on Linux strace is a possibility?
+ delay(0.1);
+
+ is($td->kill, 1, 'start graceful shutdown');