Index: sdk/lib/io/http.dart |
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart |
index b869f39aaef03a8b268026f0d2e5ce801dd0b43d..18360c64d6d85e50a2fb5f5f4dbeefd54a2c4de3 100644 |
--- a/sdk/lib/io/http.dart |
+++ b/sdk/lib/io/http.dart |
@@ -1128,8 +1128,12 @@ abstract class HttpResponse implements IOSink { |
* |
* This is normally used when a HTTP upgrade request is received |
* and the communication should continue with a different protocol. |
+ * |
+ * If [writeHeaders] is `true`, the status line and [headers] will be written |
+ * to the socket before it's detached. If `false`, the socket is detached |
+ * immediately, without any data written to the socket. Default is `true`. |
*/ |
- Future<Socket> detachSocket(); |
+ Future<Socket> detachSocket({bool writeHeaders: true}); |
/** |
* Gets information about the client connection. Returns [:null:] if the |